]> git.ipfire.org Git - thirdparty/ccache.git/commit
feat: Rewrite path after -Xclang -include to relative (#1318)
authorJiulong Wang <jiulongw@gmail.com>
Thu, 3 Aug 2023 12:01:23 +0000 (05:01 -0700)
committerGitHub <noreply@github.com>
Thu, 3 Aug 2023 12:01:23 +0000 (14:01 +0200)
commit1ba30e24d9022ae3e7ee779450773b804594a58a
tree5776ae68f57608e486d572f8f9cc756153528680
parentd8b654a30ca89107547f9add1e28046cef899a74
feat: Rewrite path after -Xclang -include to relative (#1318)

cmake may generate both -include and -include-pch. Example:

c++ ... -Xclang -include-pch -Xclang /abs/path/cmake_pch.hxx.pch
        -Xclang -include -Xclang /abs/path/cmake_pch.hxx ...

Both paths needs to be converted to relative path if CCACHE_BASEDIR is
set for better cache hit rate in some CI systems.
src/argprocessing.cpp