Windows Visual Studio with Intel toolset cannot find OpenMP (missing:OpenMP_libiomp5md_LIBRARY)
Hi,
I am trying to add OpenMP support to my project using
find_package (OpenMP)
but it will fail with the following message:
cmake -G "Visual Studio 15 2017 Win64" -T "Intel C++ Compiler 18.0" ../test/
-- The CXX compiler identification is Intel 18.0.1.20171018
-- Check for working CXX compiler: C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2018/windows/bin/intel64/icl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2018/windows/bin/intel64/icl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiler id = Intel
-- Could NOT find OpenMP_CXX (missing: OpenMP_libiomp5md_LIBRARY) (found version "5.0")
-- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/workspace/build
However, I can build from the command line with the icl and OpenMP support natively. Furthermore, it seems, that cmake can detect the OpenMP version, though it does not find the libiomp5md.lib but it is in the respective directory:
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\compiler\lib\intel64_win
My system is a Windows 10 64 bit machine. I have installed intel 2018 software tools together with visual studio 15 2017 The cmake version is 3.10.2
The same issue happens on a Win7 64 bit machine, with Intel 2017 and visual studio 14 2015. The camke version here is 3.9.2
Is there some magic I am missing to set the correct paths for the cmake system to find the obviously existing libraries?
Thanks in advance
Edited by rrahn