[cmake-developers] Making Config.cmake files easier to write

Alexander Neundorf neundorf at kde.org
Thu Feb 16 10:48:40 EST 2012


On Thursday 16 February 2012, Brad King wrote:
> On 2/16/2012 10:15 AM, Alexander Neundorf wrote:
> > On Thursday 16 February 2012, Brad King wrote:
> >> In hindsight that name was poorly chosen.  I'd really like to see
> >> "package" in the name because they are "package configuration files". 
> >> Otherwise there is no indication it has anything to do with
> >> find_package.
> > 
> > Well, it has to do with Config files :-)
> 
> Okay, so it can have "PackageConfig" in its name since they are
> "package configuration" files.
> 
> > So which one ?
> > 1) configure_config_file() + write_basic_config_version_file()
> > 2) configure_package_file() + write_basic_config_version_file()
> > 3) configure_package_file() + write_basic_package_version_file()
> > 
> > Personally, I prefer 1) and 3) over 2).
> 
> include(CMakePackageConfigHelper) # "CMakeConfigHelper" is ambiguous IMO
> configure_package_config_file(...)
> write_basic_config_version_file(...) # no need to change name

Ok, so we have
1) configure_config_file()         + write_basic_config_version_file()

2) configure_package_file()        + write_basic_config_version_file()
3) configure_package_file()        + write_basic_package_version_file()

4) configure_package_config_file() + write_basic_config_version_file()
5) configure_package_config_file() + write_basic_package_version_file()
6) configure_package_config_file() + write_basic_package_config_version_file()

My choice would be:
1), 5), 6), 3), 4), 2)

So, 5) ?

Alex



More information about the cmake-developers mailing list