Skip to content

Updates likwid-config.cmake to support find_package

Created by: jrmadsen

  • added test/cmake for testing whether the find_package works
  • modified installation location (required for find_package to work
  • Validation test:
# build and install likwid
make && make install
# go to cmake test folder
cd test/cmake
# make build directory
mkdir build && cd build
# configure where PREFIX is the entry in config.mk
CMAKE_PREFIX_PATH=${PREFIX} cmake ..
# build the test executable
make

I had to change the installation location to get find_package(likwid) to work correctly, here are the options for Unix installs:

<prefix>/(lib/<arch>|lib*|share)/cmake/<name>*/                 
<prefix>/(lib/<arch>|lib*|share)/<name>*/                       
<prefix>/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/         
<prefix>/<name>*/(lib/<arch>|lib*|share)/cmake/<name>*/         
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/               
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/ 

Merge request reports