MantisBT - CMake
View Issue Details
0015303CMakeCMakepublic2014-12-13 09:452015-05-04 09:05
scunz 
 
normalminorN/A
closedduplicate 
CMake 3.0.2 
 
0015303: Turning off package registry
Even though the package registry system is a nice and very welcome feature, I have 2 scenarios in which the automatic it is more of a burden than useful. I'd like to turn it off via a command line argument to cmake - Or more precise: I want to either turn off finding packages through the registry or turn off the writing to the registry.

These scenarios are:

1. I'm running builds of a lot of libraries in a CI system. The builds each do a full fetch-source / build / install / archive results each. There are several different build jobs for each library. The libraries have a deep tree of dependencies on each other.
The build trees are fully separated from each other. Build results from other projects (i.e. prerequisite libraries) are copied into a local install tree for each build. Occasionally, cmake now finds libraries inside other job's build trees and uses them, which I want to avoid. Thus, I'm removing the .cmake directory before each build right now. However, there's a race condition, that is triggered when one project is installing the config files into the registry while another job has just cleaned the registry and not yet finished the cmake run.

Of course, I do not want to pollute the CMakeLists with conditionals that disable the registry on find_package calls (which would be a lot of work for me). For now, I simply do a "chmod 700 ~./.cmake && chown root:root ~/.cmake" on the CI system, but this seems more like a hack and causes some warnings...

2. (Less important) I have several source/build trees of the same libraries on my machines and the entries in the registry do not get stale (as build trees are always there) when I switch between these checkouts. I've worked around the occasional confusion this produces by always outputting the paths that have been found and check them manually on each cmake run. This is of course not an optimal solution.
No tags attached.
duplicate of 0014849closed Daniele E. Domenichelli Need a way to disable CMake package registry 
Issue History
2014-12-13 09:45scunzNew Issue
2014-12-13 11:34Daniele E. DomenichelliRelationship addedduplicate of 0014849
2014-12-15 09:14Brad KingNote Added: 0037457
2014-12-15 09:14Brad KingStatusnew => resolved
2014-12-15 09:14Brad KingResolutionopen => duplicate
2015-05-04 09:05Robert MaynardNote Added: 0038698
2015-05-04 09:05Robert MaynardStatusresolved => closed

Notes
(0037457)
Brad King   
2014-12-15 09:14   
This was discussed in 0014849 and a solution is available in the upcoming 3.1 release. Please see the 3.1 release notes for details:

 http://www.cmake.org/cmake/help/v3.1/release/3.1.0.html#commands [^]
(0038698)
Robert Maynard   
2015-05-04 09:05   
Closing resolved issues that have not been updated in more than 4 months.