We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
/Zc:__cplusplus
/MP
1 parent 885b547 commit 5ebfc92Copy full SHA for 5ebfc92
CMakeLists.txt
@@ -34,7 +34,7 @@ elseif(NOT CMAKE_CXX_STANDARD)
34
endif()
35
36
# make sure __cplusplus is defined when using msvc and enable parallel build
37
-if(MSVC)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
38
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP")
39
40
@@ -161,7 +161,7 @@ if(SPDLOG_BUILD_SHARED OR BUILD_SHARED_LIBS)
161
162
add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS})
163
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
164
- if(MSVC)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
165
target_compile_options(spdlog PUBLIC $<$<AND:$<CXX_COMPILER_ID:MSVC>,$<NOT:$<COMPILE_LANGUAGE:CUDA>>>:/wd4251
166
/wd4275>)
167
0 commit comments