fix(cmake): avoid issue with NVCC + Windows (#3947)

This commit is contained in:
Henry Schreiner 2022-05-16 23:45:54 -04:00 committed by GitHub
parent 1a7b12983e
commit dff6fa0554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ if(MSVC) # That's also clang-cl
set_property(
TARGET pybind11::windows_extras
APPEND
PROPERTY INTERFACE_COMPILE_OPTIONS /bigobj)
PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:/bigobj>)
# /MP enables multithreaded builds (relevant when there are many files) for MSVC
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # no Clang no Intel