View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011707CMake(No Category)public2011-01-16 13:502011-01-31 16:13
ReporterNicolas Despres 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinux 2.6.32-27-generic #49 i686OSUbuntuOS Version10.04.1 LTS
Product VersionCMake 2.8.3 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0011707: Cannot use ccache when building cmake
DescriptionIf have tried to bootstrap cmake using ccache and gcc by setting CC='ccache gcc' and CXX='ccache g++' but it does not work and ccache is not used.
Steps To Reproduce$ mkdir _build
$ cd _build
$ CC='ccache gcc' CXX='ccache g++' ../configure --prefix="$HOME/usr/stow/cmake" --qt-gui --qt-qmake=/usr/bin/qmake --parallel=2 --verbose
Additional InformationI have attached the cmake_bootstrap.log. Apparently bootstrap understands CC and CXX as a list so it first tries ccache alone as a compiler and then gcc alone. Of course ccache alone fails to build the test program so gcc is picked up instead of 'ccache gcc'.

I would suggest to add a --enable-ccache option to this script. I'll try to write a patch.
TagsNo tags attached.
Attached Fileslog file icon cmake_bootstrap.log [^] (192,125 bytes) 2011-01-16 13:50
patch file icon bootstrap-enable-ccache.patch [^] (1,446 bytes) 2011-01-16 16:34 [Show Content]

 Relationships

  Notes
(0024731)
Nicolas Despres (reporter)
2011-01-16 18:49

Oups. My patch 'bootstrap-enable-ccache.patch' that accurate in the usage message.

Now it is:
Enable ccache when bootstrapping and building cmake.

But it should be:
Enable ccache when building cmake.
(0024733)
Michael Wild (reporter)
2011-01-17 06:54

alternatively, simply symlink ccache to ./gcc and ./g++ and then set CC=$PWD/gcc and CXX=$PWD/g++.
(0024734)
Michael Wild (reporter)
2011-01-17 07:06

And if you're using Ubuntu/Debian and installed ccache using the package manager, use CC=/usr/lib/ccache/gcc and CXX=/usr/lib/ccache/g++ directly. If using CentOS/RHEL/Fedora/OpenSUSE/..., replace the /usr/lib with /usr/lib64 if running a 64-bit operating system. Other operating systems will have similar facilities.
(0024744)
Brad King (manager)
2011-01-17 09:04

Applied. Thanks.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cba29d2 [^]

 Issue History
Date Modified Username Field Change
2011-01-16 13:50 Nicolas Despres New Issue
2011-01-16 13:50 Nicolas Despres File Added: cmake_bootstrap.log
2011-01-16 16:34 Nicolas Despres File Added: bootstrap-enable-ccache.patch
2011-01-16 18:49 Nicolas Despres Note Added: 0024731
2011-01-17 06:54 Michael Wild Note Added: 0024733
2011-01-17 07:06 Michael Wild Note Added: 0024734
2011-01-17 09:03 Brad King Assigned To => Brad King
2011-01-17 09:03 Brad King Status new => assigned
2011-01-17 09:04 Brad King Note Added: 0024744
2011-01-17 09:04 Brad King Status assigned => closed
2011-01-17 09:04 Brad King Resolution open => fixed
2011-01-31 16:13 David Cole Fixed in Version => CMake 2.8.4
2011-01-31 16:13 David Cole Target Version => CMake 2.8.4


Copyright © 2000 - 2018 MantisBT Team