Now asking for cpp14

This commit is contained in:
Kylart 2019-11-02 01:34:55 +01:00
parent 6327f4dc90
commit c3d8c463b7
1 changed files with 6 additions and 5 deletions

View File

@ -9,11 +9,12 @@ set(CMAKE_BUILD_TYPE Release)
# Windows things...
if (MSVC_VERSION GREATER_EQUAL "1900")
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("/std:c++latest" _cpp_latest_flag_supported)
if (_cpp_latest_flag_supported)
add_compile_options("/std:c++14")
endif()
message("MSVC 19 detected (${MSVC_VERSION}), setting flags")
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("/std:c++14" _cpp_14_flag_supported)
if (_cpp_14_flag_supported)
add_compile_options("/std:c++14")
endif()
endif()
# LibGCrypt