From: Michihiro NAKAJIMA Date: Sun, 19 Feb 2012 22:06:52 +0000 (+0900) Subject: Do not overwrite the default setting of CMAKE_C_FLAGS{_DEBUG}. X-Git-Tag: v3.0.4~2^2~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88145f44e754a9d551562428b92573d601a38d86;p=thirdparty%2Flibarchive.git Do not overwrite the default setting of CMAKE_C_FLAGS{_DEBUG}. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2eba9a0f6..fa3f868bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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