KDE/kdelibs
Christophe Giboudeaux
cgiboudeaux at gmail.com
Mon Dec 14 21:13:33 GMT 2009
On Monday 14 December 2009 21:31:09 Alexander Neundorf wrote:
> On Monday 14 December 2009, Christophe Giboudeaux wrote:
> > Hi,
> >
> > 2009/12/14 Frederik Gladhorn <gladhorn at kde.org>:
> > > SVN commit 1062338 by gladhorn:
> > >
> > > Require libattica as get hot new stuff upload depends on it.
> > >
> > > Version 0.1.1 is required from either the tag or trunk.
> > > http://websvn.kde.org/tags/attica/
> > > http://websvn.kde.org/trunk/kdesupport/attica/
> > >
> > > A tarball should be available shortly (do not use 0.1.0)
> > > ftp://ftp.kde.org/pub/kde/stable/attica/
> > >
> > > CCMAIL: kde-core-devel at kde.org
> > >
> > >
> > >
> > > M +4 -0 CMakeLists.txt
> > >
> > >
> > > --- trunk/KDE/kdelibs/CMakeLists.txt #1062337:1062338
> > > @@ -60,6 +60,10 @@
> > > find_package(Strigi REQUIRED)
> > > macro_log_feature(STRIGI_FOUND "Strigi" "A fast and small desktop
> > > searching program" "http://strigi.sourceforge.net" TRUE
> > > "${STRIGI_MIN_VERSION}" "Required by some critical kioslaves.")
> > >
> > > +set(LIBATTICA_MIN_VERSION "0.1.2")
> > > +find_package(LibAttica REQUIRED)
> > > +macro_log_feature(LIBATTICA_FOUND "libattica" "A library to access
> > > Open Collaboration Service providers"
> > > "http://websvn.kde.org/trunk/kdesupport/attica/" FALSE "" "Required for
> > > Get Hot New Stuff.") +
> >
> > This doesn't make sense: if LibAttica is 'REQUIRED', 'FALSE' is
> > incorrect in the macro_log_feature
> >
> > Please remove the REQUIRED keyword and change the next line:
> > macro_log_feature(LIBATTICA_FOUND "libattica" "A library to access
> > Open Collaboration Service providers"
> > "http://websvn.kde.org/trunk/kdesupport/attica/" TRUE
> > "${LIBATTICA_MIN_VERSION}" "Required for Get Hot New Stuff.")
>
> Actually I'm not really happy with the boolean argument for
> macro_log_feature().
> With
> find_package(Foo REQUIRED)
> you immediately see what's missing, and also cmake doesn't continue
> processing further.
That's exactly the reason why it should be used. Instead of re-configuring a
given module for every REQUIRED dependency that couldn't be found, you get a
clear summary which indicates which are the missing required and optional
packages.
> If cmake continues altough something which is required has not been found,
> it might produce other errors in the meantime, since other things can rely
> on stuff being there, and may file if actually is not there, like e.g.
> executing some tool at cmake time, or it may also complain about some
> variables being "NOTFOUND" but used anyway, like here (produced with the
> attached file):
>
> --------------8<----------------8<-------------8<--------------
>
> hammer:~/src/CMake/tests/notfound-test/b$ make rebuild_cache
> Running CMake to regenerate build system...
> CMake Error at CMakeLists.txt:8 (message):
> foo not found !
>
>
> CMake Error: The following variables are used in this project, but they are
> set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the CMake
> files:
> foo
> linked by target "blub" in
> directory /home/alex/src/CMake/tests/notfound-test
>
> -- Configuring incomplete, errors occurred!
> make: *** [rebuild_cache] Error 1
> hammer:~/src/CMake/tests/notfound-test/b$
>
> --------------8<----------------8<-------------8<--------------
Here's an example showing why the REQUIRED keyword may also be misleading:
CMakeLists.txt:
project(demo)
cmake_minimum_required(VERSION 2.8)
find_package(SharedDesktopOntologies 0.3 REQUIRED)
SharedDesktopOntologies 0.3 doesn't exist. When running this CMakeLists.txt,
the only information you will get is that:
[quote]
CMake Error at CMakeLists.txt:4 (find_package):
Could not find module FindSharedDesktopOntologies.cmake or a configuration
file for package SharedDesktopOntologies.
Adjust CMAKE_MODULE_PATH to find FindSharedDesktopOntologies.cmake or set
SharedDesktopOntologies_DIR to the directory containing a CMake
configuration file for SharedDesktopOntologies. The file will have one of
the following names:
SharedDesktopOntologiesConfig.cmake
shareddesktopontologies-config.cmake
-- Configuring incomplete, errors occurred!
[/quote]
Which is totally wrong. The directory which contains
SharedDesktopOntologiesConfig.cmake is in my CMAKE_PREFIX_PATH, if I change the
minimum version to 0.2, CMake will find it.
Christophe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20091214/7de23a0e/attachment.sig>
More information about the kde-core-devel
mailing list