[cmake-developers] [CMake 0015303]: Turning off package registry

Mantis Bug Tracker mantis at public.kitware.com
Sat Dec 13 09:45:57 EST 2014


The following issue has been SUBMITTED. 
====================================================================== 
https://www.cmake.org/Bug/view.php?id=15303 
====================================================================== 
Reported By:                scunz
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15303
Category:                   CMake
Reproducibility:            N/A
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-12-13 09:45 EST
Last Modified:              2014-12-13 09:45 EST
====================================================================== 
Summary:                    Turning off package registry
Description: 
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.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-12-13 09:45 scunz          New Issue                                    
======================================================================



More information about the cmake-developers mailing list