You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is problematic if the language is in anything other than C++, which in my case was CUDA. The nvcc compiler does not recognize /bigobj (or at least I think this is what happens) and therefore raises an error:
[Nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified]
There is a very similar issue raised here, which details a bug concerning /MP: #1532 (comment)
There are a lot of similar bugs if you care to google, and the consensus (whenever there is one) seems to be that /MP and /bigobj are the culprits. I personally have solved this problem by simply changing the line to, but I'm not certain whether this is the best fix: PROPERTY INTERFACE_COMPILE_OPTIONS $<$<NOT:$<CONFIG:Debug>>:$<$<COMPILE_LANGUAGE:CXX>:/bigobj>>)
Reproducible example code
No response
The text was updated successfully, but these errors were encountered:
Required prerequisites
Problem description
The cmake compile options for pybind11 currently adds a /bigobj option if MSVC is used, as can be seen here:
pybind11/tools/pybind11Common.cmake
Line 99 in 1c636f4
This is problematic if the language is in anything other than C++, which in my case was CUDA. The nvcc compiler does not recognize /bigobj (or at least I think this is what happens) and therefore raises an error:
There is a very similar issue raised here, which details a bug concerning /MP:
#1532 (comment)
There are a lot of similar bugs if you care to google, and the consensus (whenever there is one) seems to be that /MP and /bigobj are the culprits. I personally have solved this problem by simply changing the line to, but I'm not certain whether this is the best fix:
PROPERTY INTERFACE_COMPILE_OPTIONS $<$<NOT:$<CONFIG:Debug>>:$<$<COMPILE_LANGUAGE:CXX>:/bigobj>>)
Reproducible example code
No response
The text was updated successfully, but these errors were encountered: