Review Request: Make kdepim-runtime configuration less verbose
Alexander Neundorf
neundorf at kde.org
Tue Sep 4 17:11:19 UTC 2012
On Tuesday 04 September 2012, Aleix Pol Gonzalez wrote:
> > On Aug. 20, 2012, 4:37 p.m., Raphael Kubo da Costa wrote:
> > > Doesn't the same change also apply to the other find_package() calls
> > > there?
> >
> > Allen Winter wrote:
> > Yes, I'm also curious about why these 2 are so much more irritating
> > than any other find_packages()
> >
> > Aleix, can you paste the annoying parts? Maybe we can convince the
> > libkolab folks to make their stuff less babbly.
>
> Well, it's what happens when you look for a Config.cmake file that has to
> be installed.
>
> Sorry for the delay, forgot about providing this :P.
>
> CMake Warning at CMakeLists.txt:122 (find_package):
> By not providing "FindLibkolab.cmake" in CMAKE_MODULE_PATH this project
> has asked CMake to find a package configuration file provided by
> "Libkolab", but CMake did not find one.
>
> Could not find a package configuration file provided by "Libkolab"
> (requested version 0.2) with any of the following names:
>
> LibkolabConfig.cmake
> libkolab-config.cmake
>
> Add the installation prefix of "Libkolab" to CMAKE_PREFIX_PATH or set
> "Libkolab_DIR" to a directory containing one of the above files. If
> "Libkolab" provides a separate development package or SDK, be sure it has
> been installed.
Now a serious question: what is irritating about these warnings ?
They state exactly what happens.
They happen if you simply do
find_package(LibKolab)
If you do instead
find_package(LibKolab NO_MODULE)
they will be slightly different, since in this case cmake doesn't have to guess
whether you are looking for a FindLibKolab.cmake or a LibKolabConfig.cmake.
CMake will still tell you that it didn't find that file and what to do about it.
If you want to get the short messages you are used to.
add a simply FindLibKolab.cmake, which contains more or less
find_package(LibKolab NO_MODULE QUIET)
find_package_handle_standard_args(LibKolab DEFAULT_MSG LibKolab_DIR)
Or, with cmake >= 2.8.3 (which we do not require yet):
find_package_handle_standard_args(NAME LibKolab CONFIG_MODE)
Alex
More information about the Kde-buildsystem
mailing list