[CMake] [cmake] [RFC] rewriting FindMKL

Alexander Neundorf neundorf at kde.org
Mon Jan 22 16:20:52 EST 2018


On 2018 M01 22, Mon 15:16:50 CET Sik wrote:
> Hello CMake users and devs,
> 
> In openmeeg we are reviewing our MKL package finder to make it more
> maintainable for ourselves and others who had adopted our solution.
> Therefore I'm writing you requesting comments and feedback so that is
> useful for everyone.
> 
> Here is the project we have set up in order to test it. It has a simple
> example using MKL and CI for different scenarios.
> 
> https://github.com/openmeeg/findmkl_cmake

that's quite a lot of stuff, I'll try to test itin the next days.

Just a few quick comments:

The MESSAGE() in line 39 is ALL_UPPERCASE.

MKL_ROOT_DIR from line 31 is put into the cache, reusing the same variable 
name in line 35 probably works, but the interaction between cache- and non-
cache variables is somewhat complicated, so I would recommend to use different 
names.

When searching mkl_cblas.h in line 31, in case the Intel compiler is used, the 
install directory of CMAKE_CXX_COMPILER could be used in some way as a hint to 
help finding MKL.

I don't like the error message in line 39, I usually prefer using 
CMAKE_PREFIX_PATH.

Lines 87 to 95 are not correctly indented, also lines 105 to 112.

Is BLA_STATIC in line 117 correct, or is this a typo ?

Alex



More information about the CMake mailing list