This repository was archived by the owner on Feb 4, 2020. It is now read-only.

Description
As suggested in #273 and #355 I currently have this for my clcache in cmake in VS:
function(any_target_hook)
set(NON_COMPILE_TARGETS INTERFACE IMPORTED UNKNOWN ALIAS)
list(FIND NON_COMPILE_TARGETS ${func_ARGV1} found)
if(${found} GREATER -1)
return()
endif()
set_target_properties(${func_ARGV0} PROPERTIES VS_GLOBAL_CLToolExe ${variable_stoing_my_clcache_executable_name})
set_target_properties(${func_ARGV0} PROPERTIES VS_GLOBAL_CLToolPath ${variable_stoing_my_clcache_path})
set_target_properties(${func_ARGV0} PROPERTIES VS_GLOBAL_NoDependency $ENV{CLCACHE_DIR}/stats.txt)
set_target_properties(${func_ARGV0} PROPERTIES VS_GLOBAL_TrackFileAccess "false")
endfunction()
function(add_library)
_add_library(${func_ARGN})
any_target_hook(${func_ARGN})
endfunction()
function(add_executable)
_add_executable(${ARGN})
any_target_hook(${ARGN})
endfunction()
I do believe that clcache is working, verified by much faster build times as well as clcache -s showing changes.... however, within Visual Studio (with CMake), every build performs a full clean rebuild, which is faster due to clcache, but really CMake and MSBuild should realise things are up to date before that... and instead of a 3 minute build... i should get a 10 second "everything is up to date"
Any suggestions?