From 401f8b8ef55b4b050e7bb6268ced0e4a77203510 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 10 Apr 2020 19:02:21 -1000 Subject: [PATCH] Exclude CMake CXX standard from MSVC --- specter/CMakeLists.txt | 23 +++++++++++++++-------- specter/zeus | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/specter/CMakeLists.txt b/specter/CMakeLists.txt index 9aece31b3..7ad37c244 100644 --- a/specter/CMakeLists.txt +++ b/specter/CMakeLists.txt @@ -66,20 +66,27 @@ add_library(specter if (MSVC) target_compile_options(specter PRIVATE # Enforce various standards compliant behavior. - /permissive- + $<$:/permissive-> # Enable standard volatile semantics. - /volatile:iso + $<$:/volatile:iso> # Reports the proper value for the __cplusplus preprocessor macro. - /Zc:__cplusplus + $<$:/Zc:__cplusplus> - # Allow constexpr variables to have explicit external linkage. - /Zc:externConstexpr - - # Assume that new throws exceptions, allowing better code generation. - /Zc:throwingNew + # Use latest C++ standard. + $<$:/std:c++latest> ) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + # Flags for MSVC (not clang-cl) + target_compile_options(specter PRIVATE + # Allow constexpr variables to have explicit external linkage. + $<$:/Zc:externConstexpr> + + # Assume that new throws exceptions, allowing better code generation. + $<$:/Zc:throwingNew> + ) + endif() endif() target_link_libraries(specter PUBLIC diff --git a/specter/zeus b/specter/zeus index 6ac3066a6..ef3578990 160000 --- a/specter/zeus +++ b/specter/zeus @@ -1 +1 @@ -Subproject commit 6ac3066a6f1c5d9ebee07eaf0f5aea849b935585 +Subproject commit ef35789909da139d77a4fd7b6fbbb9eadad10d93