[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: [krita/krita/4.1] /: Replace the KritaDevs build type with a cmake option
From: Boudewijn Rempt <null () kde ! org>
Date: 2018-07-26 15:06:12
Message-ID: E1fihqG-0004bJ-MD () code ! kde ! org
[Download RAW message or body]
Git commit 18eed92c11641b835217f880f9f930dc0181a2b4 by Boudewijn Rempt.
Committed on 26/07/2018 at 14:56.
Pushed by rempt into branch 'krita/4.1'.
Replace the KritaDevs build type with a cmake option
Qt5's cmake scripts check the build type, and for anything other
than Debug append -DQT_NO_DEBUG, which disables Q_ASSERT. We
want to build with optimizations (-O3 -g) and without QT_NO_DEBUG
when developing Krita, so we catch the asserts and still have
a realistic performance.
CCMAIL:kimageshop@kde.org
M +6 -3 CMakeLists.txt
https://commits.kde.org/krita/18eed92c11641b835217f880f9f930dc0181a2b4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a6e4fab5e5..e625d01f37a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,7 +61,7 @@ if (APPLE)
endif()
if (CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND \
NOT WIN32)
- add_definitions(-Werror=delete-incomplete)
+
endif()
######################
@@ -298,7 +298,6 @@ include (MacroEnsureOutOfSourceBuild)
macro_ensure_out_of_source_build("Compiling Krita inside the source directory is not \
possible. Please refer to the build instruction \
https://community.kde.org/Krita#Build_Instructions")
-
# Note: OPTIONAL_COMPONENTS does not seem to be reliable
# (as of ECM 5.15.0, CMake 3.2)
@@ -396,10 +395,14 @@ add_definitions(-DTRANSLATION_DOMAIN=\"krita\")
# The reason for this mode is that the Debug mode disable inlining
#
if(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS_KRITADEVS "-O3 -g" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals")
endif()
+option(KRITA_DEVS "For Krita developers. This modifies the DEBUG build type to use \
-O3 -g, while still enabling Q_ASSERT. This is necessary because the Qt5 cmake \
modules normally append QT_NO_DEBUG to any build type that is not labeled Debug") +if \
(KRITA_DEVS) + set(CMAKE_CXX_FLAGS_DEBUG "-O3 -g" CACHE STRING "" FORCE)
+endif()
+
if(UNIX)
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};m")
endif()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic