summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Strapetz <marc.strapetz@gmail.com>2016-03-15 18:20:32 +0100
committerMarc Strapetz <marc.strapetz@gmail.com>2016-03-15 18:23:54 +0100
commit08f030ced70e0f5d4b8c3f6421899b25c74b2329 (patch)
tree3bae551e3bd87cf1029c074503ded2a5f1df94d9
parentb7809b84692b4df7f11d603cc5da0860609e0555 (diff)
downloadlibgit2-08f030ced70e0f5d4b8c3f6421899b25c74b2329.tar.gz
CMake: do not overwrite but only append to CMAKE_C_FLAGS_DEBUG
This is useful to force "smart" IDEs (like CLIon) to use debug flag -g even it may have decided that "-D_DEBUG" (which is already present) is sufficient.
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1801c938d..2cfa907f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -412,7 +412,7 @@ IF (MSVC)
# /MTd - Statically link the multithreaded debug version of the CRT
# /MDd - Dynamically link the multithreaded debug version of the CRT
# /RTC1 - Run time checks
- SET(CMAKE_C_FLAGS_DEBUG "/Zi /Od /D_DEBUG /RTC1 ${CRT_FLAG_DEBUG}")
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Zi /Od /D_DEBUG /RTC1 ${CRT_FLAG_DEBUG}")
# /DNDEBUG - Disables asserts
# /MT - Statically link the multithreaded release version of the CRT
@@ -464,7 +464,7 @@ ELSE ()
ENDIF()
IF (WIN32 AND NOT CYGWIN)
- SET(CMAKE_C_FLAGS_DEBUG "-D_DEBUG")
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
ENDIF ()
IF (MINGW) # MinGW always does PIC and complains if we tell it to