mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 03:47:43 +00:00
Exclude CMake CXX standard from MSVC
This commit is contained in:
@@ -66,20 +66,27 @@ add_library(specter
|
|||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(specter PRIVATE
|
target_compile_options(specter PRIVATE
|
||||||
# Enforce various standards compliant behavior.
|
# Enforce various standards compliant behavior.
|
||||||
/permissive-
|
$<$<COMPILE_LANGUAGE:CXX>:/permissive->
|
||||||
|
|
||||||
# Enable standard volatile semantics.
|
# Enable standard volatile semantics.
|
||||||
/volatile:iso
|
$<$<COMPILE_LANGUAGE:CXX>:/volatile:iso>
|
||||||
|
|
||||||
# Reports the proper value for the __cplusplus preprocessor macro.
|
# Reports the proper value for the __cplusplus preprocessor macro.
|
||||||
/Zc:__cplusplus
|
$<$<COMPILE_LANGUAGE:CXX>:/Zc:__cplusplus>
|
||||||
|
|
||||||
# Allow constexpr variables to have explicit external linkage.
|
# Use latest C++ standard.
|
||||||
/Zc:externConstexpr
|
$<$<COMPILE_LANGUAGE:CXX>:/std:c++latest>
|
||||||
|
|
||||||
# Assume that new throws exceptions, allowing better code generation.
|
|
||||||
/Zc:throwingNew
|
|
||||||
)
|
)
|
||||||
|
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.
|
||||||
|
$<$<COMPILE_LANGUAGE:CXX>:/Zc:externConstexpr>
|
||||||
|
|
||||||
|
# Assume that new throws exceptions, allowing better code generation.
|
||||||
|
$<$<COMPILE_LANGUAGE:CXX>:/Zc:throwingNew>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(specter PUBLIC
|
target_link_libraries(specter PUBLIC
|
||||||
|
|||||||
Submodule specter/zeus updated: 6ac3066a6f...ef35789909
Reference in New Issue
Block a user