Commit 11488610 by Eric Fiselier

Don't use c++14

parent 9a118340
...@@ -18,14 +18,12 @@ include_directories(${source_dir}/include) ...@@ -18,14 +18,12 @@ include_directories(${source_dir}/include)
ExternalProject_Get_Property(googletest binary_dir) ExternalProject_Get_Property(googletest binary_dir)
link_directories(${binary_dir}) link_directories(${binary_dir})
# Enable the latest C++ standard possible # Try and enable C++11. Don't use C++14 because it doesn't work in some
# configurations.
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(--std=c++14 HAVE_FLAG_CXX_14)
check_cxx_compiler_flag(--std=c++11 HAVE_FLAG_CXX_11) check_cxx_compiler_flag(--std=c++11 HAVE_FLAG_CXX_11)
check_cxx_compiler_flag(--std=c++0x HAVE_FLAG_CXX_0X) check_cxx_compiler_flag(--std=c++0x HAVE_FLAG_CXX_0X)
if (HAVE_FLAG_CXX_14) if (HAVE_FLAG_CXX_11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14")
elseif (HAVE_FLAG_CXX_11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
elseif (HAVE_FLAG_CXX_0X) elseif (HAVE_FLAG_CXX_0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment