diff --git a/CMakeLists.txt b/CMakeLists.txt index 653c820f93f21a0c106cb1ed1b9c623c77cc1f97..abe435bf640eab5cb095bda3aed702b14e617c03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14) if(COMPILER_SUPPORTS_CXX14) message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++14 support.") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + set(CMAKE_CXX_STANDARD 14) else() message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") endif()