mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
Add /Zc:__cplusplus to MSVC compiler flags
Fix build errors for a clean build on Windows. For details about the CMake teting code see https://stackoverflow.com/a/60890947/1254880
This commit is contained in:
parent
6327cf12c2
commit
eb5613563b
1 changed files with 4 additions and 0 deletions
|
@ -185,6 +185,10 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU|Intel" AND NOT CMAKE_SYSTEM
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (MSVC AND MSVC_VERSION GREATER_EQUAL 1914)
|
||||
list(APPEND mi_cflags /Zc:__cplusplus)
|
||||
endif()
|
||||
|
||||
# Architecture flags
|
||||
if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm" AND NOT APPLE)
|
||||
check_cxx_compiler_flag(-march=native CXX_SUPPORTS_MARCH_NATIVE)
|
||||
|
|
Loading…
Add table
Reference in a new issue