[cmake-developers] Package Config files with COMPONENTS

Brad King brad.king at kitware.com
Tue Mar 13 13:30:48 EDT 2012


On 3/13/2012 1:12 PM, Alexander Neundorf wrote:
> Setting CMP0018 to new would mean that the project supports only those
> component-aware packages which follow that new convention.

Yes, that cannot be a requirement to use

   cmake_minimum_required(VERSION 2.8.8)

or whatever version of CMake introduces the policy as that would set
it to NEW implicitly.  We cannot make this a special case because then
it would simply not be a policy.  It introduces a requirement on the
CMake version-awareness of a project's dependencies instead of just
the project.

 > Some users/developers would prefer if there was a more strict definition of
 > how the COMPONENTS arguments should be handled.

My proposal only requires the small change to CMake already under
discussion and makes it possible for projects to provide package
configuration files that handle components in a nice way.  It also
does not preclude the possibility of a future convention.  However,
any "strict definition" of behavior would *force* every project to
adapt to it even if it doesn't make sense just because it made
sense for a few *other* projects.

-Brad



More information about the cmake-developers mailing list