[cmake-developers] [CMake 0015354]: regression: ccache no longer works with cmake 3.1.2
Mantis Bug Tracker
mantis at public.kitware.com
Wed Jan 14 18:09:25 EST 2015
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=15354
======================================================================
Reported By: Tom Hughes
Assigned To:
======================================================================
Project: CMake
Issue ID: 15354
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-01-14 18:09 EST
Last Modified: 2015-01-14 18:09 EST
======================================================================
Summary: regression: ccache no longer works with cmake 3.1.2
Description:
Between cmake 3.0.2 and 3.1.2, ccache (v3.2.1) stopped working (I'm using the
ninja generator). I had been using ccache by setting CMAKE_C_COMPILER to ccache
and CMAKE_C_COMPILER_ARG1 to clang.
In the original project where I hit this, the error occurs during the first run
of cmake when it decides that it needs to re-run configure:
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /usr/local/bin/ccache
CMAKE_CXX_COMPILER= /usr/local/bin/ccache
CMAKE_C_COMPILER= /usr/local/bin/ccache
CMAKE_CXX_COMPILER= /usr/local/bin/ccache
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- broken
However, in the simple test case that I created, it doesn't occur until you
touch the CMakeLists.txt and re-run ninja (see attachments).
Steps to Reproduce:
I have a simple test case that reproduces the problem and a script that you can
use with "git bisect run" (attached as find-cmake-bug.sh).
That points to the following commit:
commit 6120fca8e229da08fae1d58017962491fb6e03f3
Author: Sylvain Joubert <joubert.sy at gmail.com>
Date: Sat Sep 20 22:37:52 2014 +0200
Ninja: Prevent compilers to be silently modified
Unlike with Unix Makefiles generator modifying compiler paths was not
protected with Ninja generator. It was possible to modify them in the
cache without the expected effect on the generated solution. Also
activate corresponding tests with Ninja.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-01-14 18:09 Tom Hughes New Issue
2015-01-14 18:09 Tom Hughes File Added: cmake-ccache-bug.tar.gz
======================================================================
More information about the cmake-developers
mailing list