cmake: prepend to CMAKE_CXX_FLAGS instead of overwriting

This allows people to pass custom C++ flags.
This commit is contained in:
Evan Nemerson 2018-06-23 10:00:33 -07:00
parent b2d5d60862
commit 4b91e03ea9
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
endif() endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O3") set(CMAKE_CXX_FLAGS_RELEASE "-O3")