MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0015231 | CMake | CMake | public | 2014-10-31 12:31 | 2016-06-10 14:31 |
| Reporter | Charles Karney | ||||
| Assigned To | Tamas Kenez | ||||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | CMake 3.0.2 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0015231: find_package: should be a simple way to alter the order of the config/module lookups | ||||
| Description | As we are integrating cmake more and more into our environment, it is clear how much superior the config-mode for find_package is compared to the module-mode. As a result, our top-level CMakeLists.txt contains several occurrences of the following pattern find_package (PROJ4 CONFIG QUIET) if (NOT PROJ4_FOUND) find_package (PROJ4 MODULE REQUIRED) endif () Request 1: Add MODULE_FIRST CONFIG_FIRST options to find_package, meaning do the module lookup first (the default but see next) or the config lookup first. (These options complement the MODULE and CONFIG options.) So the find_package invocation above becomes find_package (PROJ4 CONFIG_FIRST REQUIRED) Request 2: Add a global variable, e.g., CMAKE_FIND_PACKAGE_PREFER_CONFIG (default OFF) to specify the default lookup order. Thus if I've worked to get all my dependent packages with config-mode support, I can invoke cmake with cmake -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON .. without having to edit the CMakeLists.txt file. Finally a comment: the advice (not sure where from) that our current pattern can be shortened to find_package (PROJ4 NO_MODULE QUIET) find_package (PROJ4 MODULE) seems not to hold in all cases. If you think this should work, let me know and I will look for a counter-example. | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2014-10-31 12:31 | Charles Karney | New Issue | |||
| 2014-10-31 12:50 | Brad King | Note Added: 0037122 | |||
| 2014-10-31 13:13 | Charles Karney | Note Added: 0037123 | |||
| 2014-10-31 13:30 | Brad King | Note Added: 0037124 | |||
| 2015-04-16 16:10 | Brad King | Note Added: 0038536 | |||
| 2015-04-20 10:09 | Brad King | Assigned To | => Tamas Kenez | ||
| 2015-04-20 10:09 | Brad King | Status | new => assigned | ||
| 2016-06-10 14:29 | Kitware Robot | Note Added: 0042656 | |||
| 2016-06-10 14:29 | Kitware Robot | Status | assigned => resolved | ||
| 2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:31 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||