CMakeLists: Add /Zc:externConstexpr compilation flag
Improves standard conformance on Windows builds.
This commit is contained in:
parent
3b2b47b522
commit
0d3375fc22
1 changed files with 4 additions and 3 deletions
|
@ -40,7 +40,7 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules")
|
||||||
# Compiler flags
|
# Compiler flags
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set(DYNARMIC_CXX_FLAGS
|
set(DYNARMIC_CXX_FLAGS
|
||||||
/std:c++latest # CMAKE_CXX_STANDARD as no effect on MSVC until CMake 3.10.
|
/std:c++latest # CMAKE_CXX_STANDARD has no effect on MSVC until CMake 3.10.
|
||||||
/W4
|
/W4
|
||||||
/w34263 # Non-virtual member function hides base class virtual function
|
/w34263 # Non-virtual member function hides base class virtual function
|
||||||
/w44265 # Class has virtual functions, but destructor is not virtual
|
/w44265 # Class has virtual functions, but destructor is not virtual
|
||||||
|
@ -55,8 +55,9 @@ if (MSVC)
|
||||||
/Zi
|
/Zi
|
||||||
/Zo
|
/Zo
|
||||||
/EHsc
|
/EHsc
|
||||||
/Zc:throwingNew # Assumes new never returns null
|
/Zc:externConstexpr # Allows external linkage for variables declared "extern constexpr", as the standard permits.
|
||||||
/Zc:inline # Omits inline functions from object-file output
|
/Zc:inline # Omits inline functions from object-file output.
|
||||||
|
/Zc:throwingNew # Assumes new (without std::nothrow) never returns null.
|
||||||
/DNOMINMAX)
|
/DNOMINMAX)
|
||||||
|
|
||||||
if (DYNARMIC_WARNINGS_AS_ERRORS)
|
if (DYNARMIC_WARNINGS_AS_ERRORS)
|
||||||
|
|
Loading…
Reference in a new issue