From: Thomas Debesse Date: Sun, 9 Jul 2017 20:01:46 +0000 (+0200) Subject: [cmake] assign CMAKE_CXX_FLAGS as a string instead of a list X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F44%2Fhead;p=xonotic%2Fnetradiant.git [cmake] assign CMAKE_CXX_FLAGS as a string instead of a list - fix command line -DCMAKE_CXX_FLAGS expansion spotted by !43 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 742fd059..dda42c76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX) include(CheckCXXCompilerFlag) check_cxx_compiler_flag(--std=c++${CMAKE_CXX_STANDARD} STD_CXX) if (STD_CXX) - list(APPEND CMAKE_CXX_FLAGS --std=c++${CMAKE_CXX_STANDARD}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++${CMAKE_CXX_STANDARD}") else () message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better") endif ()