I am using CMake-GUI to build OpenCV on Windows. By default, Window uses MSVC‘s cl.exe compiler, which comes with the dated OpenMP 2.0. I wanted to use a more modern version of OpenCV, so I changed the CMAKE_CXX_COMPILER
, CMAKE_C_COMPILER
and CUDA_HOST_COMPILER
from cl.exe to clang++.exe.
However, the configuration output still shows that I am using MSVC's cl.exe, and OpenMP 2.0 instead of OpenMP4.0+.
Do I have to use a different generator so that CMake finds the LLVM's OpenMP instead?