[CMake] CMAKE_MODULE_PATH ignored
Alain Miniussi
alain.miniussi at oca.eu
Mon Feb 8 12:43:41 EST 2016
Hi,
I am trying to fix FindHDF5.cmake (support for HDF5_ROOT is broken, only environment variable is supported and it will be eventually probably ignored in find_program).
To that end, I'd like to copy it in my source tree and use that version instead of the one in /usr/shared/cmake.
According to the documentation, all I have to do is to indicate the search directory for the FindXXX.cmak files through CMAKE_MODULE_PATH.
From the cmake --trace:
/../trunk/CMakeLists.txt(49): message(status CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH} )
## This is the correct PATH, containing the FindHDF5.cmake file
status CMAKE_MODULE_PATH: /scratch/alainm/view/seiscope/codes/3D_Acoustic/FFWI/trunk/tools/build/
## Next line:
/.../trunk/CMakeLists.txt(50): find_package(HDF5 COMPONENTS CXX Fortran )
## Wrong path selected:
/usr/share/cmake/Modules/FindHDF5.cmake(63): include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake )
How do I tell cmake I want *my* path to be selected ?
Thanks
--
---
Alain
More information about the CMake
mailing list