MantisBT - CMake
View Issue Details
0015766CMakeCMakepublic2015-10-03 18:022016-06-10 14:31
NAKAMURA Takumi 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0015766: Fails to infer CMAKE_ASM_COMPILER with CC='ccache gcc'
For CMAKE_C_COMPILER, "gcc" is fed to the first in the argument.
In contrast, "gcc" disappears for CMAKE_ASM_COMPILER.

Of course, it works if ASM is explicitly specified without ccache.
project(Test C ASM)
cmake_minimum_required(VERSION 2.8.12.2)
add_executable(Test foo.c bar.S)

# CC=ccache\ gcc cmake .

# make
[ 66%] Building ASM object CMakeFiles/Test.dir/bar.S.o
/usr/bin/ccache -o CMakeFiles/Test.dir/bar.S.o -c /home/tnakamura/fio/ninja/xxx/bar.S
/usr/bin/ccache: invalid option -- 'o'
No tags attached.
Issue History
2015-10-03 18:02NAKAMURA TakumiNew Issue
2015-10-05 08:36Brad KingNote Added: 0039505
2016-06-10 14:29Kitware RobotNote Added: 0042847
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039505)
Brad King   
2015-10-05 08:36   
CMake 3.4 will have a new CMAKE_LANG_COMPILER_LAUNCHER setting that will be the preferred way to use ccache. Does that work for this case?
(0042847)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

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.