This project also fails to build with NVBench_TOPLEVEL_PROJECT (and thus NVBench_ENABLE_WERROR because it causes a lot of clang warnings. Since I'm using nvbench as a dependency WERROR doesn't cause problems for me.
A simplified solution to this problem could be to disable the CUDA host compiler warnings if CUDA host C++ compiler and C++ compiler are not the same.
When using this project as a with
CUDAHOSTCXX=g++-11
andCXX=clang++-17
as dependency, I'm getting the following compilation error.This seems to be the case because it is implicitly assumed here
https://github.com/NVIDIA/nvbench/blob/e477bb386289a11ad8d7e358cff6527cfc593974/cmake/NVBenchConfigTarget.cmake#L28-L34
that the CUDA host compiler will accept any flags that the CXX compiler accepts.
I'm also not sure whether the second
${}
for the if is necessary asif
will implicitly resolve the variable https://github.com/NVIDIA/nvbench/blob/e477bb386289a11ad8d7e358cff6527cfc593974/cmake/NVBenchConfigTarget.cmake#L28This project also fails to build with
NVBench_TOPLEVEL_PROJECT
(and thusNVBench_ENABLE_WERROR
because it causes a lot of clang warnings. Since I'm using nvbench as a dependencyWERROR
doesn't cause problems for me.A simplified solution to this problem could be to disable the CUDA host compiler warnings if CUDA host C++ compiler and C++ compiler are not the same.