1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-01-27 09:56:31 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Gabi Melman
8fbc853b0d
Merge pull request #1829 from prateek9623/fix-prevent-msvc-warning-in-cuda
Fix: prevents MSVC warning flags to propagate in CUDA
2021-02-12 10:57:33 +02:00
Prateek Chokse
2e008b319c Fix: prevents MSVC warning flags to propagate in CUDA 2021-02-12 14:13:51 +05:30

View File

@ -132,7 +132,8 @@ if(SPDLOG_BUILD_SHARED)
add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS})
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
if(MSVC)
target_compile_options(spdlog PUBLIC /wd4251 /wd4275)
target_compile_options(spdlog PUBLIC
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<NOT:$<COMPILE_LANGUAGE:CUDA>>>:/wd4251 /wd4275>)
endif()
if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
target_compile_definitions(spdlog PRIVATE FMT_EXPORT PUBLIC FMT_SHARED)