0

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.

Clang/Clang++/exe for CMAKE

However, the configuration output still shows that I am using MSVC's cl.exe, and OpenMP 2.0 instead of OpenMP4.0+.

OpenMP2.0

Do I have to use a different generator so that CMake finds the LLVM's OpenMP instead?

disguisedtoast
  • 149
  • 1
  • 4
  • 15
  • Have you checked [that question](https://stackoverflow.com/questions/38171878/how-do-i-tell-cmake-to-use-clang-on-windows)? Its answers suggest to specify a **toolset**. – Tsyvarev Nov 10 '22 at 11:30

0 Answers0