]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Do not overwrite the default setting of CMAKE_C_FLAGS{_DEBUG}.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 19 Feb 2012 22:06:52 +0000 (07:06 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 19 Feb 2012 22:07:23 +0000 (07:07 +0900)
CMakeLists.txt

index 2eba9a0f6c97f7b0e0ad1c0ddd5a6860b8613227..fa3f868bf54b28b3390ae7a9ff218f69c7d50903 100644 (file)
@@ -59,17 +59,17 @@ SET(SOVERSION "${INTERFACE_VERSION}")
 IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
   SET(CMAKE_REQUIRED_FLAGS "-Wall")
   # Set compile flags for all build types.
-  SET(CMAKE_C_FLAGS "-Wall")
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
   # Set compile flags for debug build.
   # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
   SET(CMAKE_C_FLAGS_DEBUG
-      "-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual")
+      "${CMAKE_C_FLAGS_DEBUG} -Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual")
 ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
 IF (MSVC)
   # NOTE: /WX option is the same as gcc's -Werror option.
   SET(CMAKE_REQUIRED_FLAGS "/WX")
   # Set compile flags for all build types.
-  SET(CMAKE_C_FLAGS "/WX")
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
 ENDIF (MSVC)
 
 # Enable CTest/CDash support