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...@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 ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers