Exclude CMake CXX standard from MSVC

This commit is contained in:
Jack Andersen 2020-04-10 19:02:01 -10:00
parent 6ac3066a6f
commit ef35789909
2 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17 cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
project(zeus) project(zeus)
set(CMAKE_CXX_STANDARD 17) if (NOT MSVC)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
set(SOURCES set(SOURCES
src/CVector3f.cpp src/CVector3f.cpp

View File

@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17 cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
project(zeustest) project(zeustest)
set(CMAKE_CXX_STANDARD 17) if (NOT MSVC)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
add_executable(zeustest main.cpp) add_executable(zeustest main.cpp)
target_link_libraries(zeustest zeus) target_link_libraries(zeustest zeus)