diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f63781e..2c1bdadf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING INTERNAL) endif(NOT CMAKE_BUILD_TYPE) -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.1.3) if(NOT WIN32) option( USE_NATIVE_ARCH "build which -march=native" ON) endif(NOT WIN32) @@ -204,6 +204,7 @@ macro(get_dll_from_lib dll_path lib_path) get_filename_component(lib_name ${lib} name) endmacro() +set(CMAKE_CXX_STANDARD 14) if(WIN32) get_WIN32_WINNT(ver) add_definitions(-D_WIN32_WINNT=${ver} -DWNT -DWNT_WINDOW -DNOMINMAX) @@ -215,7 +216,6 @@ if(WIN32) else(WIN32) # build shared libraries set(NG_LIB_TYPE SHARED) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") endif(WIN32) if(APPLE) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")