QUESTION: How to pass flags to compiler but not linker?
I'm trying to compile CUDA code with Clang, which involves passing in -x cuda
to the compiler. However, if that flag is included in the link line, then Clang assumes that the object files are CUDA source files and strange errors ensue. Is there any way in CMake to define flags that are only passed in for compilation and not for linking?