FindOpenMP imported targets do not scope their flags correctly and missing COMPILE_LANGUAGE support in MSVC
The imported targets OpenMP::OpenMP_<LANG>
do not scope their compile flags correctly, so the flags are added to compile targets for all languages. In my case, this causes failures when nvcc (CUDA sources) reports that openmp is not a known option.
I tried scoping manually via $<COMPILE_LANGUAGE:CXX>
, however this doesn't work for me either because
$<COMPILE_LANGUAGE:...>
may not be used with Visual Studio generators.