- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use MKLConfig.cmake (wind64) via example cmakelist.txt
using:
cmake -G"Visual Studio 17 2022" -A x64
It a happily finds and uses MKLConfig.cmake, until it fails to find MKL_C (.lib?)
etc etc
-- Found MKL: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/compiler/lib/intel64/libiomp5md.lib
-- Configuring done
CMake Error at CMakeLists.txt:8 (target_compile_options):
Error evaluating generator expression:
$<TARGET_PROPERTY:MKL::MKL_C,INTERFACE_COMPILE_OPTIONS>
Target "MKL::MKL_C" not found.
(When working, I will add Fortran as well)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peter,
Thanks for reaching out to us.
>>...until it fails to find MKL_C (.lib?)
The issue is reproducible with the CMakeLists.txt provided in the documentation
Thanks for letting us know. we will check on that and will let you know about the same.
Here's how we can resolve the error that we are getting during cmake step.
So while checking for the target MKL::MKL_C (which we see in error)in MKLConfig.cmake file, I didn't find it and it is mentioned as follows from line 88 to 91
MKL::MKL
# Link line for C and Fortran API
# MKL::MKL_DPCPP
# Link line for DPC++ API
which tells that MKL::MKL would suffice to work with both C and Fortran API's
and after replacing
>> MKL::MKL_C
with
<< MKL::MKL
in your CMakeLists.txt it worked without generating any such errors.
Also we suggest you to refer to the CMakeLists.txt file which is present under this location "C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\examples\examples_core_c.zip\c" where you can see only MKL::MKL used as target.
Here is the screenshot for your reference
Please do let us know if you still face any issues.
Regards,
Vidya.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peter,
Thanks for reaching out to us.
>>...until it fails to find MKL_C (.lib?)
The issue is reproducible with the CMakeLists.txt provided in the documentation
Thanks for letting us know. we will check on that and will let you know about the same.
Here's how we can resolve the error that we are getting during cmake step.
So while checking for the target MKL::MKL_C (which we see in error)in MKLConfig.cmake file, I didn't find it and it is mentioned as follows from line 88 to 91
MKL::MKL
# Link line for C and Fortran API
# MKL::MKL_DPCPP
# Link line for DPC++ API
which tells that MKL::MKL would suffice to work with both C and Fortran API's
and after replacing
>> MKL::MKL_C
with
<< MKL::MKL
in your CMakeLists.txt it worked without generating any such errors.
Also we suggest you to refer to the CMakeLists.txt file which is present under this location "C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\examples\examples_core_c.zip\c" where you can see only MKL::MKL used as target.
Here is the screenshot for your reference
Please do let us know if you still face any issues.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peter,
Thanks for accepting the solution.
Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.
Have a Great Day!
Regards,
Vidya.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page