[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    Re: No NDEBUG in release mode
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2007-12-09 13:55:21
Message-ID: 200712091455.25914.caslav.ilic () gmx ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


> I've noticed that when I configure kdelibs with -
> DCMAKE_BUILD_TYPE=release, there is no NDEBUG defined. [...]

How about the attached patch? I think Thiago mentioned some other except
NDEBUG could be defined as well.

-- 
Chusslove Illich (Часлав Илић)

["kdelibs-build-2007-12-09-a.diff" (text/x-diff)]

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 744781)
+++ CMakeLists.txt	(working copy)
@@ -43,6 +43,12 @@
 macro_optional_find_package(Libintl)
 macro_optional_find_package(OpenGL)
 
+# define *DEBUG marcros based on build type
+STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
+if(CMAKE_BUILD_TYPE_TOLOWER MATCHES release)
+   set(NDEBUG 1)
+endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES release)
+
 #########################################################################
 # Disallow in-source build
 macro_ensure_out_of_source_build("kdelibs requires an out of source build. Please \
                create a separate build directory and run 'cmake path_to_kdelibs \
                [options]' there.")
Index: config.h.cmake
===================================================================
--- config.h.cmake	(revision 744781)
+++ config.h.cmake	(working copy)
@@ -172,6 +172,8 @@
 /* Defined to 1 if you have a d_type member in struct dirent */
 #cmakedefine HAVE_DIRENT_D_TYPE 1
 
+/* Defined to 1 to disable debug code */
+#cmakedefine NDEBUG 1
 
 #if defined _WIN32 || defined _WIN64
 #define KPATH_SEPARATOR ';'


["signature.asc" (application/pgp-signature)]

_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic