KDE/kdelibs/cmake/modules

David Faure faure at kde.org
Fri Feb 17 17:52:45 CET 2006


On Thursday 16 February 2006 21:16, Brad King wrote:
> David Faure wrote:
> > I think 
> > include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
> > is something that would make sense in every cmakelist (-> macro needed).
> > When you write #include "foo.h" in a file, you don't expect that a foo.h file in another directory
> > will be preferred... Automake compiled from that dir (unlike cmake), and had -I. ...
> 
> What do you mean by "compiled from that dir"?  CMake always runs the 
> compiler from the build-tree directory corresponding to the source-tree 
> directory in which the target was added.

Would you bet your life on it? ;0

/devel/other/inst/icecream/bin/c++   -Dkdeprint_rlpr_EXPORTS  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -fno-exceptions -fno-check-new -fno-common -fPIC -I/devel/kde/src/4/kdelibs/dcop -I/devel/kde/src/4/kdelibs/kdecore -I/devel/kde/src/4/kdelibs/kdeui -I/devel/kde/src/4/kdelibs/kio/kio -I/devel/kde/src/4/kdelibs/libltdl -I/devel/kde/src/4/kdelibs/kio/kfile -I/devel/kde/src/4/kdelibs/interfaces -I/devel/kde/src/4/kdelibs/kio -I/devel/kde/src/4/kdelibs/kio/kssl -I/devel/kde/src/4/kdelibs/kdefx -I/devel/kde/src/4/kdelibs/kabc -I/devel/kde/src/4/qt-copy/include -I/devel/kde/src/4/qt-copy/include/Qt -I/devel/kde/src/4/qt-copy/include/QtCore -I/devel/kde/src/4/qt-copy/include/QtGui -I/devel/kde/src/4/qt-copy/include/Qt3Support -I/devel/kde/src/4/qt-copy/include/QtAssistant -I/devel/kde/src/4/qt-copy/include/QtDesigner -I/devel/kde/src/4/qt-copy/include/QtNetwork -I/devel/kde/src/4/qt-copy/include/QtOpenGL -I/devel/kde/src/4/qt-copy/include/QtSql -I/devel/kde/src/4/qt-copy/include/QtXml -I/devel/kde/src/4/qt-copy/include/QtSvg -I/devel/kde/src/4/qt-copy/include/QtTest -I/devel/kde/src/4/kdelibs -I/usr/X11R6/include -I/devel/kde/build/4/kdelibs4_cmake -I/usr/local/include -I/devel/kde/src/4/kdelibs/kdeprint -I/devel/kde/src/4/kdelibs/kdeprint/management -I/devel/kde/src/4/kdelibs/kdeprint/rlpr -I/devel/kde/build/4/kdelibs4_cmake/kdeprint/rlpr   -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE -DQT3_SUPPORT -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DQT3_SUPPORT_WARNINGS -DHAVE_CONFIG_H=1 -o kdeprint/rlpr/CMakeFiles/kdeprint_rlpr.dir/kmproprlpr.o -c /devel/kde/src/4/kdelibs/kdeprint/rlpr/kmproprlpr.cpp

The "-o kdeprint/rlpr/CMakeFiles/kdeprint_rlpr.dir/kmproprlpr.o" shows that C++ is running
from the toplevel of kdelibs, not from kdelibs/kdeprint/rlpr where the target is defined.

> For the include directories we're working on a design for optionally 
> enabling automatic listing of a target's source/build tree at the 
> beginning of the include path.

Thanks a lot. Alex: let's wait for that before changing kde4_header then.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list