fix(build): invalid generator expression for CUDA targets
Description
In cmake/build/macros.cmake l.1139
, we pass the following generator expression to the target:
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Werror;-Wno-error=deprecated-declarations>"
This fails for NVCC, which doesn't know about -Wno-error=deprecated-declarations
.
We therefore need to add this flag only when compiling C++, using something like:
"$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<COMPILE_LANGUAGE:CXX>>:-Werror;-Wno-error=deprecated-declarations>"
This is also the occasion to make a global pass on all similar generator expressions in other CMake files.
Steps to reproduce
How one can reproduce the issue - this is very important. If the bug depends on a particular environment or platform, please give all relevant details. Paste any relevant logs. Please use code blocks (```) to format these.
Functional specifications
If there is any change to the workflow, UX/UI design, screenshots, etc..., please describe it here.
Technical specifications
Details of the implementation of the fix.
Test plan
Describe how you will verify that the bug is fixed.