Cannot build with ccache & clang - cmake issue?
Milian Wolff
mail at milianw.de
Sat Mar 1 17:43:32 UTC 2014
Hey all,
is anyone else using ccache in combination with clang to build KF5? A few days
ago it worked for me, so maybe something in cmake git broke (we do use cmake
git for KF5, right?). In order to use ccache with clang, I export the
following:
export CXX=ccache /usr/bin/clang++ -Qunused-arguments
export CC=ccache /usr/bin/clang -Qunused-arguments
This worked for quite some time for me and I build KDE4 apps happily with it.
Trying to build KF5 today yielded:
# kdesrc-build running: 'make'
# from directory: /home/milian/projects/kf5/build/extragear/utils/kdesrc-build
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/ccache
-- Check for working C compiler: /usr/bin/ccache -- broken
CMake Error at
/home/milian/projects/compiled/kf5/share/cmake-3.0/Modules/CMakeTestCCompiler.cmake:61
(message):
The C compiler "/usr/bin/ccache" is not able to compile a simple test
program
It fails with the following output:
<snip>
Building C object
CMakeFiles/cmTryCompileExec3325854589.dir/testCCompiler.c.o
/usr/bin/ccache -o
CMakeFiles/cmTryCompileExec3325854589.dir/testCCompiler.c.o -c
/home/milian/projects/kf5/build/extragear/utils/kdesrc-
build/CMakeFiles/CMakeTmp/testCCompiler.c
/usr/bin/ccache: invalid option -- 'o'
<snip>
Of course this will fail. Why is it ignoring the other values set int CC/CXX?
Can someone tell me how to configure CMake git to use clang & ccache in
another way?
Thanks
--
Milian Wolff
mail at milianw.de
http://milianw.de
More information about the Kde-frameworks-devel
mailing list