KDE/kdelibs/cmake/modules

Brad King brad.king at kitware.com
Sat Feb 18 16:41:27 CET 2006


David Faure wrote:
> On Thursday 16 February 2006 21:16, Brad King wrote:
>>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/de
v!
>  el/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.

Okay, CMake *used* to always run the compiler, linker, and custom 
commands from the "proper" directory.  When the new makefile generator 
was implemented last year things were changed so that make always runs 
with its current working directory set to the top level of the build 
tree.  All the commands were setup to be generated with "cd" commands to 
run things from the proper subdirectories but it looks like this was not 
done for the compiler (linker and custom commands are okay).  As long as 
the proper include directories are created this is probably okay but it 
won't hurt to fix it for consistency either.  I'll put it on my todo list.

-Brad


More information about the Kde-buildsystem mailing list