| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0014802 | CMake | CMake | public | 2014-03-10 16:06 | 2015-11-02 09:13 | ||||
| Reporter | Gregor Jasny | ||||||||
| Assigned To | |||||||||
| Priority | normal | Severity | feature | Reproducibility | N/A | ||||
| Status | closed | Resolution | won't fix | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | CMake 2.8.12.2 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0014802: Add option to find_library to invalidate cache if hints or paths have changed | ||||||||
| Description | Hello, in our build system we read the version of precompiled libraries with cmake from a file. This version and a well-known path suffix form the PATH attribute of the find_library (and similar) command. But if the version is gets changed, cmake will be still using the cached entry. My proposal is to add a parameter that changes the behaviour: Once the hints / paths, etc. to the find_library call changes, the cached result will be purged. Currently I'm using a self-written function to achieve this behaviour but I think it is generic and useful enough to have it provided within cmake itself. Thanks, Gregor | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0035387) Brad King (manager) 2014-03-11 11:43 |
One problem is that HINTS are sometimes computed from temporary information like environment variables at the time CMake first runs on a project. Then the result of the find_* command is cached so it does not matter if the same hint is available again later. When a CMakeLists.txt file is modified then the build system may invoke CMake to re-generate the project. The environment of that invocation can be different, and will cause a different set of HINTS to be computed. With the proposed behavior the find_* command would ignore the existing cached result and re-run but no longer have the possibly needed hint available. In general a find_* command is unlikely to have enough information about when it should re-run to decide to invalidate the entry itself. It looks like in your use case you have code to unset(... CACHE) the values before the find_* calls when the loaded versions have changed. That is using case-specific information. |
|
(0038286) Gregor Jasny (developer) 2015-03-24 12:21 |
I added some custom functions to perform the invalidation. You could close this one. |
|
(0039745) Robert Maynard (manager) 2015-11-02 09:13 |
Closing resolved issues that have not been updated in more than 4 months. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2014-03-10 16:06 | Gregor Jasny | New Issue | |
| 2014-03-11 09:29 | Brad King | Relationship added | related to 0014803 |
| 2014-03-11 09:52 | Brad King | Relationship deleted | related to 0014803 |
| 2014-03-11 11:43 | Brad King | Note Added: 0035387 | |
| 2015-03-24 12:21 | Gregor Jasny | Note Added: 0038286 | |
| 2015-03-24 13:33 | Brad King | Status | new => resolved |
| 2015-03-24 13:33 | Brad King | Resolution | open => won't fix |
| 2015-11-02 09:13 | Robert Maynard | Note Added: 0039745 | |
| 2015-11-02 09:13 | Robert Maynard | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |