Added MSVC flag to Cmake

This commit is contained in:
Kylart 2019-11-02 01:20:36 +01:00
parent 0b28d5fb91
commit 6327f4dc90
1 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,15 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
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()
endif()
# LibGCrypt
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/libtorrent/cmake/Modules)