No NDEBUG in release mode

Allen Winter winter at kde.org
Thu Dec 20 15:43:24 CET 2007


On Sunday 09 December 2007 08:55:21 Chusslove Illich wrote:
> > I've noticed that when I configure kdelibs with -
> > DCMAKE_BUILD_TYPE=release, there is no NDEBUG defined. [...]

Counter proposal:

Index: FindKDE4Internal.cmake
===================================================================
--- FindKDE4Internal.cmake      (revision 750678)
+++ FindKDE4Internal.cmake      (working copy)
@@ -932,11 +932,11 @@ if (CMAKE_C_COMPILER MATCHES "icc")
    set (KDE4_ENABLE_EXCEPTIONS -fexceptions)
    # Select flags.
    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-   set(CMAKE_CXX_FLAGS_RELEASE        "-O2")
+   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG")
    set(CMAKE_CXX_FLAGS_DEBUG          "-O2 -g -0b0 -noalign")
    set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g -Ob0 -noalign")
    set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g")
-   set(CMAKE_C_FLAGS_RELEASE          "-O2")
+   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG")
    set(CMAKE_C_FLAGS_DEBUG            "-O2 -g -Ob0 -noalign")
    set(CMAKE_C_FLAGS_DEBUGFULL        "-g -Ob0 -noalign")


More information about the Kde-buildsystem mailing list