How to make CMake not forget the command-line parameters

William A. Hoffman billlist at nycap.rr.com
Sun May 21 17:58:30 CEST 2006


At 09:13 AM 5/21/2006, Thiago Macieira wrote:
>William A. Hoffman wrote:
>>OK, that is some information.  At least the problem was not introduced
>>by 2.4.2, (my first fear....).   Did someone add a
>> set(CMAKE_CXX_COMPILER ... FORCE) into kdelibs??   The size of the
>> project should not cause this problem. Are there any environment
>> variables that you are setting?
>
>I'm trying the following test:
>
>$ cmake -DCMAKE_CXX_COMPILER=/opt/teambuilder2/bin/g++ $OLDPWD
>[...]
>$ cp CMakeCache.txt CMakeCache.txt.old
>$ touch $OLDPWD/CMakeLists.txt
>$ make
>[...]
>
>$ diff -u CMakeCache.txt{.old,}
>^[[6~--- CMakeCache.txt.old     2006-05-21 15:06:11.000000000 +0200
>+++ CMakeCache.txt      2006-05-21 15:06:41.000000000 +0200
>@@ -57,7 +57,7 @@
> CMAKE_BUILD_TYPE:STRING=
>
> //CXX compiler.
>-CMAKE_CXX_COMPILER:FILEPATH=/opt/teambuilder2/bin/g++
>+CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
>
> //Flags used by the compiler during all build types.
> CMAKE_CXX_FLAGS:STRING=' '
>
>As you can see, the only thing that changes is the C++ compiler.


I can not seem to reproduce the problem.

kitware at dash17:~/testkde/kdelibs_snap/foo$ ~/Dashboards/cmake-2.4.1-build/bin/cmake -DCMAKE_CXX_COMPILER=`pwd`/billc++ -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/kitware/Dashboards/Support/qt-copy-install/bin/qmake ../kdelibs
kitware at dash17:~/testkde/kdelibs_snap/foo$ grep CMAKE_CXX_COMPILER CMakeCache.txt 
CMAKE_CXX_COMPILER:FILEPATH=/home/kitware/testkde/kdelibs_snap/foo/billc++
//Advanced flag for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
CMAKE_CXX_COMPILER_WORKS:INTERNAL=1


make rebuild_cache; grep CMAKE_CXX_COMPILER CMakeCache.txt 
Running CMake to regenerate build system...
-- Found Qt-Version 4.1.1
-- Building kdelibs...
-- Found KDE4 dcopidl preprocessor: /home/kitware/testkde/kdelibs_snap/kdelibs/dcop/dcopidlng/dcopidl
-- Found KDE4 dcopidl2cpp preprocessor: /home/kitware/testkde/kdelibs_snap/foo/bin/./dcopidl2cpp.sh
-- Found KDE4 kconfig_compiler preprocessor: /home/kitware/testkde/kdelibs_snap/foo/bin/./kconfig_compiler.sh
-- This is a SVN repository
-- Using Buildname: Linux-billc++
-- Found ACL support: /lib/libacl.so;/lib/libattr.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kitware/testkde/kdelibs_snap/foo
CMAKE_CXX_COMPILER:FILEPATH=/home/kitware/testkde/kdelibs_snap/foo/billc++
//Advanced flag for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
CMAKE_CXX_COMPILER_WORKS:INTERNAL=1



If you do make rebuild_cache does it happen ?
Or is only when you touch a CMakeLists.txt file?

-Bill




More information about the Kde-buildsystem mailing list