I am trying to use OpenMP 4.5 on Windows but MSVC seems to not support OpenMP > 2.0
I found that Clang supports OpenMP 4.5 but I can't make it work on Windows.
I have Visual Studio 2017, Clang 8.0.0 and CMake 3.13 installed.
To build my CMake project, I call:
cmake .. -G Ninja -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER:PATH="C:/Program Files/LLVM/bin/lld-link.exe"
But it cannot find OpenMP :
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
If I build using clang alone (clang.exe & clang++.exe instead of clang-cl.exe), it finds Clang's OpenMP lib (OpenMP 5.0)
If I build using MSVC alone, it finds OpenMP 2.0
But using clang-cl.exe, it does not find OpenMP (neither version)
Is there a way to get OpenMP 4.5 working on Windows ?
Thanks,