Questions tagged «ccache»

8
如何在CMake中使用CCache?
我想执行以下操作:如果PATH中存在CCache,则使用“ ccache g ++”进行编译,否则使用g ++。我尝试编写一个小的my-cmake脚本,其中包含 CC="ccache gcc" CXX="ccache g++" cmake $* 但它似乎不起作用(运行make仍不使用ccache;我在CMAKE_VERBOSE_MAKEFILE上选中了它)。 更新: 按照此链接,我尝试将脚本更改为 cmake -D CMAKE_CXX_COMPILER="ccache" -D CMAKE_CXX_COMPILER_ARG1="g++" -D CMAKE_C_COMPILER="ccache" -D CMAKE_C_COMPILER_ARG1="gcc" $* 但是cmake可以避免抱怨使用编译器ccache失败(这是可以预期的)。
90 c++  unix  cmake  ccache 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.