|
Hey,
just a short comment about using globbing for header and cpp files in cmake: Some time ago I've read a lengthy discussion about this on the cmake mailing list about this and the consensus was that this generally is not a good idea, because it prevents the cmake cache from working correctly here. If you add a file to a folder where globbing is use, cmake (at least in the old versions) did not notice it, because the globbing result was cached. So you had to remove the cache to compile this file. Is this still the case? Cheers, Johannes Am 17.12.2010 22:34 schrieb Andi Clemens: > SVN commit 1207397 by aclemens: > > simplify CMakeLists.txt > > M +7 -6 CMakeLists.txt > > > --- trunk/extragear/graphics/digikam/utilities/advancedrename/CMakeLists.txt #1207396:1207397 > @@ -1,3 +1,4 @@ > +# sources > FILE(GLOB libadvancedrename_SRCS > ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp > ${CMAKE_CURRENT_SOURCE_DIR}/common/*.cpp > @@ -8,14 +9,14 @@ > ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/database/keys/*.cpp > ) > > -KDE4_ADD_UI_FILES(libadvancedrename_SRCS > - ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/fillmodifierdialogwidget.ui > - ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/replacemodifierdialogwidget.ui > - ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/rangemodifierdialogwidget.ui > - ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/dateoptiondialogwidget.ui > - ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/sequencenumberoptiondialogwidget.ui > +# ui files > +FILE(GLOB libadvancedrename_UI > + ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/*.ui > + ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/*.ui > ) > > +KDE4_ADD_UI_FILES(libadvancedrename_SRCS ${libadvancedrename_UI}) > + > KDE4_ADD_LIBRARY(advancedrename STATIC ${libadvancedrename_SRCS}) > > TARGET_LINK_LIBRARIES(advancedrename _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
|
Works fine here, I tested it.
I really hate this in cmake, defining every single source file in there... at work I use boost.build which is so much easier to handle, and you use globbing in there all the time. So I tried it in cmake as well and it seems to work fine for me here... Andi Clemens ----------------- www.digikam.org On Friday 17 December 2010 22:54:09 Johannes Wienke wrote: > Hey, > > just a short comment about using globbing for header and cpp files in > cmake: Some time ago I've read a lengthy discussion about this on the > cmake mailing list about this and the consensus was that this generally is > not a good idea, because it prevents the cmake cache from working > correctly here. If you add a file to a folder where globbing is use, cmake > (at least in the old versions) did not notice it, because the globbing > result was cached. So you had to remove the cache to compile this file. > > Is this still the case? > > Cheers, > Johannes > > Am 17.12.2010 22:34 schrieb Andi Clemens: > > SVN commit 1207397 by aclemens: > > > > simplify CMakeLists.txt > > > > M +7 -6 CMakeLists.txt > > > > --- > > trunk/extragear/graphics/digikam/utilities/advancedrename/CMakeLists.txt > > #1207396:1207397 @@ -1,3 +1,4 @@ > > +# sources > > > > FILE(GLOB libadvancedrename_SRCS > > > > ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp > > ${CMAKE_CURRENT_SOURCE_DIR}/common/*.cpp > > > > @@ -8,14 +9,14 @@ > > > > ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/database/keys/*.cpp > > > > ) > > > > -KDE4_ADD_UI_FILES(libadvancedrename_SRCS > > - > > ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/fillmodifierdialogwidget.ui > > - > > ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/replacemodifierdialogwidget > > .ui - > > ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/rangemodifierdialogwidget.u > > i - > > ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/dateoptiondialogwidget.ui - > > > > ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/sequencenumberoptiondialogwid > > get.ui +# ui files > > +FILE(GLOB libadvancedrename_UI > > + ${CMAKE_CURRENT_SOURCE_DIR}/parser/modifiers/*.ui > > + ${CMAKE_CURRENT_SOURCE_DIR}/parser/options/*.ui > > > > ) > > > > +KDE4_ADD_UI_FILES(libadvancedrename_SRCS ${libadvancedrename_UI}) > > + > > > > KDE4_ADD_LIBRARY(advancedrename STATIC ${libadvancedrename_SRCS}) > > > > TARGET_LINK_LIBRARIES(advancedrename Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
| Free forum by Nabble | Edit this page |
