MantisBT - CMake
View Issue Details
0015937CMakeCCMakepublic2016-01-28 02:292016-06-10 14:21
Michi Henning 
 
normalmajoralways
closedunable to reproduce 
Ubuntuxenial
CMake 3.2.2 
 
0015937: ccmake no longer permits setting CMAKE_CXX_COMPILER and no longer finds ccache
I have ccache in my path as the first directory. With older versions of cmake, I could run "ccmake .." and it would find and set the C and C++ compiler according to what was in my path, meaning that the ccache version of the compiler was found automatically.

With the current version of cmake/ccmake, this no longer works. /usr/lib/ccache/cc and /usr/lib/ccache/c++ are no longer detected as the compilers, and it appears to be impossible to change which compiler is used from ccmake.

This is also annoying because, previously, I could easily switch between gcc and clang via ccmake, by simply changing the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER settings. But now, these settings are no longer shown.

Could you restore the previous functionality please? Having to endlessly change this from the command line is really tedious.
No tags attached.
Issue History
2016-01-28 02:29Michi HenningNew Issue
2016-01-28 05:27Sam SpilsburyNote Added: 0040338
2016-01-28 05:38Michi HenningNote Added: 0040339
2016-01-28 08:35Brad KingNote Added: 0040341
2016-01-28 08:37Brad KingNote Added: 0040342
2016-01-28 20:56Michi HenningNote Added: 0040352
2016-03-08 02:11Michi HenningNote Added: 0040644
2016-03-08 08:24Brad KingStatusnew => resolved
2016-03-08 08:24Brad KingResolutionopen => unable to reproduce
2016-06-10 14:21Kitware RobotNote Added: 0041234
2016-06-10 14:21Kitware RobotStatusresolved => closed

Notes
(0040338)
Sam Spilsbury   
2016-01-28 05:27   
Those settings are usually found in the advanced options - try hitting "t" to show them. You might need to scroll down on the list if they're not immediately visible.
(0040339)
Michi Henning   
2016-01-28 05:38   
I can see this option after hitting "t" with older versions, but not the current one. I'll double-check tomorrow when I get access to the relevant machine again. But I'm very certain that, with the version of ccmake I'm using on xenial, the C and C++ compiler options are no longer shown.
(0040341)
Brad King   
2016-01-28 08:35   
I cannot reproduce the missing CMAKE_C_COMPILER behavior in ccmake using current 'master', 3.4, or the 3.2 version reported here. Please provide a sample CMakeLists.txt that causes the problem and specify exactly the CMake version and generator you choose.

I also cannot reproduce the failure to find ccache compilers when they are in the path (e.g. PATH=/usr/lib/ccache:$PATH).
(0040342)
Brad King   
2016-01-28 08:37   
> the version of ccmake I'm using on xenial

Is that provided by some kind of packaging system? Do we know whether they patch cmake in their distribution?

Please test with an official upstream binary or a local build from upstream source:

 https://cmake.org/download/ [^]
(0040352)
Michi Henning   
2016-01-28 20:56   
The cmake and ccmake I'm using are from ubuntu xenial, version 3.3.2is3.2.2-0ubuntu4 (same version for both cmake and ccmake).

The project I'm building is here: https://code.launchpad.net/~unity-team/thumbnailer/devel [^]

The CMakeLists.txt in the top-level directory is: http://bazaar.launchpad.net/~unity-team/thumbnailer/devel/view/head:/CMakeLists.txt [^]

The project works fine with older versions of cmake, such as 3.0.2.

Even though /usr/lib/ccache is the first directory in my path, it isn't found. When I hit "t" in ccmake, it shows me all sorts of compiler related settings, such as CMAKE_CXX_FLAGS, but CMAKE_CXX_COMPILER is *not* shown.

Looking at the commit history of the Ubuntu package, it looks like that is a fork that has not been kept up to date.

I'll try rebuilding from source, thanks.
(0040644)
Michi Henning   
2016-03-08 02:11   
I can't reproduce this anymore. I have no idea what was wrong with my machine, but things work again now.
(0041234)
Kitware Robot   
2016-06-10 14:21   
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.