> 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 (Часлав Илић)
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 ';'

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to