Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non consistency of the config file name and the installation subdirectory #353

Open
fpruvost opened this issue Apr 27, 2022 · 2 comments
Open

Comments

@fpruvost
Copy link

Hi,

When trying to use find_package(arpack-ng) as usual, I realized that you have recently changed (cf. #350) the name of the config file installed from arpack-ng-config.cmake to arpackng-config.cmake.
The problem is that the installation subdirectory for this file has not being updated consistently cf.

https://github.com/opencollab/arpack-ng/blob/master/CMakeLists.txt#L812
https://github.com/opencollab/arpack-ng/blob/master/CMakeLists.txt#L814

the DESTINATION should be updated to ${CMAKE_INSTALL_LIBDIR}/cmake/arpackng so that users can use find_package(arpackng) successfully.

Thanks

@fghoussen
Copy link
Collaborator

No problem: arpack-ng was the previous name, you just need to export env variables to point the correct dir.

When trying to use find_package(arpack-ng) as usual, I realized that you have recently changed

I had to. For this to work, the token you pass to find_package must match the cmake file name and the env variable name you must export (there can be no arpack-ng_DIR but arpackng_DIR works)

export arpackng_DIR="${TMP_PREFIX}/lib/${ARCH}/cmake/arpack-ng"

@fpruvost
Copy link
Author

fpruvost commented May 2, 2022

Yes you can do this way but it's a pity to be limited to only one option over all possibilities of CMake. Say ${ARPACK_PREFIX} is the installation directory root, we cannot use -DCMAKE_PREFIX_PATH="${ARPACK_PREFIX}" or arpackng_ROOT=${ARPACK_PREFIX} as env. var. for instance.

Reading the documentation the <name>* used should be consistent with the <PackageName> or names given by NAMES.

I can also change the way I use find_package, for instance :

find_package(arpackng REQUIRED NAMES arpackng arpack-ng)

is working. But still it's a pity that is does not work by default with standard means of cmake.
For me this call

find_package(arpackng REQUIRED)

should work directly with -DCMAKE_PREFIX_PATH="${ARPACK_PREFIX}".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants