View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015331 | CMake | Modules | public | 2014-12-31 02:45 | 2014-12-31 05:15 | ||||
Reporter | AmiGO | ||||||||
Assigned To | |||||||||
Priority | low | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | Linux | OS | Fedora | OS Version | 20 | ||||
Product Version | CMake 2.8.12.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015331: Impossible to use Modules from GIT as project-local module because of CMAKE_CURRENT_LIST_DIR | ||||||||
Description | CMake package: cmake-2.8.12.2-2.fc20.x86_64 Here is the details: https://github.com/Kitware/CMake/blob/master/Modules/FindLibLZMA.cmake [^] Line 57: include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake) Line 66: include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) CMAKE_CURRENT_LIST_DIR causes CMake to search for CheckLibraryExists and FindPackageHandleStandardArgs in directory where the FindLibLZMA was placed. So if I want to include FindLibLZMA in project-local CMake modules directory CMake will fail. Sometimes before it looks like include(FindPackageHandleStandardArgs) and observed behaviour was correct but now it's broken. | ||||||||
Steps To Reproduce | 1. Untar demo project from attachment; 2. Run cmake ./ in project directory; CMake will fail with the following message: CMake Error at cmake/FindLibLZMA.cmake:67 (include): include could not find load file: /home/AmiGO/soft/sources/zbackup/demo/cmake/FindPackageHandleStandardArgs.cmake Call Stack (most recent call first): CMakeLists.txt:6 (find_package) CMake Error at cmake/FindLibLZMA.cmake:68 (FIND_PACKAGE_HANDLE_STANDARD_ARGS): Unknown CMake command "FIND_PACKAGE_HANDLE_STANDARD_ARGS". Call Stack (most recent call first): CMakeLists.txt:6 (find_package) -- Configuring incomplete, errors occurred! 3. Comment line 67 and uncomment line 66; 4. Run cmake ./ again. Now all becomes normal. | ||||||||
Additional Information | You should probably need to introduce something like ${CMAKE_MODULE_VENDOR_PATH} that will unwind to /usr/share/cmake/Modules and use it in GIT modules instead of ${CMAKE_CURRENT_LIST_DIR}. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | demo.tar.xz [^] (1,768 bytes) 2014-12-31 02:45 | ||||||||
Relationships | |
Relationships |
Notes | |
(0037538) Rolf Eike Beer (developer) 2014-12-31 05:15 |
This works exactly as intended. If you use a module that is shipped with any recent version of CMake it will use the other modules it depends on exactly from that version of CMake because it can rely on their interface. If you want a Module that behaves differently then you should not only put a modified e.g. CheckLibraryExists.cmake in your project, but also a modified e.g. FindLZMA.cmake. If you copy modules from CMake git to your project you need to modify them anyway as you have to replace the license stub with the full BSD license. You can then also modify the include. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-12-31 02:45 | AmiGO | New Issue | |
2014-12-31 02:45 | AmiGO | File Added: demo.tar.xz | |
2014-12-31 05:15 | Rolf Eike Beer | Note Added: 0037538 | |
2014-12-31 05:15 | Rolf Eike Beer | Status | new => closed |
2014-12-31 05:15 | Rolf Eike Beer | Resolution | open => won't fix |
2014-12-31 05:15 | Rolf Eike Beer | Category | CMake => Modules |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |