On 08/02/16 19:35, Alain Miniussi wrote:
> On 08/02/2016 18:43, Alain Miniussi wrote:
>>
>> 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
>>
>
> Renaming FindHDF5.cmake in FindH5.cmake (or whatever is not present in
> the global cmake install) helps, but then I also need to replicate all
> dependencies (FindPackageMessage.cmake,
> SelectLibraryConfigurations.cmake...), shouldn't cmake look in the
> /usr/shar/cmake/... for those ?
>
> Thanks
>
> Alain
>
How do you set CMAKE_MODULE_PATH exactly? I used to have a modified
module in my source archive and prepend that dir to the variable:
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
${CMAKE_MODULE_PATH})

Regards,
Micha

Attachment: signature.asc
Description: OpenPGP digital signature

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to