0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Fix for CMake build type default flags being lost

The CMakeLists.txt adds -std=c++11 and related compiler flags, but looses default flags specified by CMake build type.
For example, -DCMAKE_BUILD_TYPE=Debug has no effect, as -g flag gets lost.
This commit is contained in:
Mateusz Loskot 2014-01-18 14:03:30 +00:00 committed by rbock
parent 2734675750
commit 62759e8de1

View File

@ -28,9 +28,9 @@ enable_testing()
message(STATUS "Using ${CMAKE_CXX_COMPILER} (compiler id: ${CMAKE_CXX_COMPILER_ID})") message(STATUS "Using ${CMAKE_CXX_COMPILER} (compiler id: ${CMAKE_CXX_COMPILER_ID})")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++") set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "-std=c++11") set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
endif () endif ()
set(include_dir "${PROJECT_SOURCE_DIR}/include") set(include_dir "${PROJECT_SOURCE_DIR}/include")