View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000979 | CMake | public | 2004-07-12 03:45 | 2004-07-28 08:24 | |||||
Reporter | Jan Woetzel | ||||||||
Assigned To | Brad King | ||||||||
Priority | low | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000979: improve FIND_PACKAGE error message | ||||||||
Description | It would be nice if the FIND_PACKAGE error message would point the user to both sources, FindFoo.cmake and FooConfig.cmake. FIND_PACKAGE(Foo) will try to find: (1) FindFoo.cmake, first and if that fails: (2) FooConfig.cmake. But, if both were NOT found, the error message just complains about FooConfig and asks to set FOO_DIR. It would be nice to have an additional hint about first try that failed - FindFoo.cmake. Our users sometimes fail to set their CMAKE_MODULE_PATH variable correctly to find FindFoo.cmake. Example if both failed: "CMake Error: FindFoo.cmake and FooConfig not found. FOO_DIR not set. It must be set to the directory containing FooConfig.cmake in order to use Foo via FooConfig.cmake". Or add path of FindFoo.cmake to CMAKE_MODULE_PATH. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0001305) Brad King (manager) 2004-07-28 08:23 |
The CMAKE_MODULE_PATH should be set by CMakeLists.txt code, not by users running CMake to build your project. This error message is intended to inform users running CMake to build a project that they need to tell CMake where to find something. If there is a FindFOO.cmake file that is supposed to be used by FIND_PACKAGE(FOO), then it is up to the author that wrote the CMakeLists.txt file containing the FIND_PACKAGE(FOO) call to make sure that the FindFOO.cmake can be found. If FIND_PACKAGE finds a FindFOO.cmake file then it simply loads that file. It is up to the contents of the FindFOO.cmake file to produce an error message if FOO cannot be found. If FIND_PACKAGE does not find a FindFOO.cmake file then it assumes the package is a CMake-aware project that has exported a FOOConfig.cmake. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |