Handle creation of C++03 flags differently

This commit is contained in:
Eric Fiselier 2015-03-18 17:08:15 -04:00
parent d40cb97713
commit 482c19d92e

View File

@ -3,10 +3,8 @@
find_package(Threads REQUIRED)
set(CXX03_FLAGS "${CMAKE_CXX_FLAGS}")
separate_arguments(CXX03_FLAGS)
list(REMOVE_ITEM CXX03_FLAGS -std=c++11 -std=c++0x)
list(APPEND CXX03_FLAGS -std=c++03)
string(REPLACE ";" " " CXX03_FLAGS "${CXX03_FLAGS}")
string(REPLACE "-std=c++11" "-std=c++03" CXX03_FLAGS "${CXX03_FLAGS}")
string(REPLACE "-std=c++0x" "-std=c++03" CXX03_FLAGS "${CXX03_FLAGS}")
macro(compile_benchmark_test name)
add_executable(${name} "${name}.cc")