Closed ChristianGebhardt closed 3 weeks ago
Thanks for the PR. I wonder how this solves the problem for nvcc? Wouldn't COMPILE_LANGUAGE:CXX
options apply to it as well?
Thanks for looking into it! For CUDA code, you would specify $<COMPILE_LANGUAGE:CUDA>
. So, it indeed differentiates between them and ignores the compile option for CUDA (or also other languages like C# or C within the project).
Please, also checkout the supported languages for reference: https://cmake.org/cmake/help/latest/command/enable_language.html
Merged, thanks!
Do not pass the compile options in the project to other compilers such as nvcc
When using the library within a project with multiple compilers, the compiler option should only be passed to the msvc compiler.