cmake: 3.11 compat
authorMichael Wallner <mike@php.net>
Thu, 27 Feb 2020 08:11:28 +0000 (09:11 +0100)
committerMichael Wallner <mike@php.net>
Thu, 27 Feb 2020 08:11:28 +0000 (09:11 +0100)
CMake/CheckDebug.cmake

index 749e188b975d638f4c9a252e6d3113178587cf4a..cc91da979171d09e23d5f375ecf7445808c00e13 100644 (file)
@@ -4,7 +4,7 @@ include(CheckCXXCompilerFlag)
 function(check_debug)
     if(CMAKE_BUILD_TYPE STREQUAL "Debug")
         add_compile_options(-O1)
-        add_compile_definitions(DEBUG=1)
+        add_definitions(-DDEBUG=1)
         foreach(FLAG IN ITEMS
                 -fno-inline
                 -fno-omit-frame-pointer
@@ -59,6 +59,6 @@ function(check_debug)
             endif()
         endif()
     else()
-        add_compile_definitions(DEBUG=0)
+        add_definitions(-DDEBUG=0)
     endif()
 endfunction()