[CMAKE] Disable debugging related GCC flags in release mode.
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 15 Jun 2015 17:26:04 +0000 (17:26 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 15 Jun 2015 17:26:04 +0000 (17:26 +0000)
svn path=/trunk/; revision=68148

reactos/cmake/gcc.cmake

index 599c669..64b0d33 100644 (file)
@@ -87,12 +87,14 @@ if((NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") AND (NOT SEPARATE_DBG))
 endif()
 
 # Debugging
-if(SEPARATE_DBG)
-    add_compile_flags("-gdwarf-2 -ggdb")
-else()
-    add_compile_flags("-gdwarf-2 -gstrict-dwarf")
-    if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
-        add_compile_flags("-femit-struct-debug-detailed=none -feliminate-unused-debug-symbols")
+if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+    if(SEPARATE_DBG)
+        add_compile_flags("-gdwarf-2 -ggdb")
+    else()
+        add_compile_flags("-gdwarf-2 -gstrict-dwarf")
+        if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+            add_compile_flags("-femit-struct-debug-detailed=none -feliminate-unused-debug-symbols")
+        endif()
     endif()
 endif()