[Build][Bugfix] Use CMAKE_ prefix for <LANG>_COMPILER_LAUNCHER#13697
[Build][Bugfix] Use CMAKE_ prefix for <LANG>_COMPILER_LAUNCHER#13697tkonolige merged 1 commit intoapache:mainfrom
Conversation
Previously, when using `set(USE_CCACHE AUTO)`, the cmake config would set variables `CXX_COMPILER_LAUNCHER` and `C_COMPILER_LAUNCHER`. While there are the target-specific properties named [`<LANG>_COMPILER_LAUNCHER`](https://cmake.org/cmake/help/latest/prop_tgt/LANG_COMPILER_LAUNCHER.html), cmake doesn't check for their use as global variables. This commit updates the build file to instead set the [`CMAKE_<LANG>_COMPILER_LAUNCHER`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_LAUNCHER.html) variables, which are used as the default for the `<LANG>_COMPILER_LAUNCHER` property.
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
1 similar comment
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
|
@tkonolige This is a follow-up to #12839. I noticed that ccache wasn't being used in my dev environment, and it looks like there was a different variable to be used. |
tkonolige
left a comment
There was a problem hiding this comment.
From my reading of the cmake documentation it seems like CXX_COMPILER_LAUNCHER should work. But using CMAKE_CXX_COMPILER_LAUNCHER should also work, so I'm fine switching to it.
…e#13697) Previously, when using `set(USE_CCACHE AUTO)`, the cmake config would set variables `CXX_COMPILER_LAUNCHER` and `C_COMPILER_LAUNCHER`. While there are the target-specific properties named [`<LANG>_COMPILER_LAUNCHER`](https://cmake.org/cmake/help/latest/prop_tgt/LANG_COMPILER_LAUNCHER.html), cmake doesn't check for their use as global variables. This commit updates the build file to instead set the [`CMAKE_<LANG>_COMPILER_LAUNCHER`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_LAUNCHER.html) variables, which are used as the default for the `<LANG>_COMPILER_LAUNCHER` property.
Previously, when using
set(USE_CCACHE AUTO), the cmake config would set variablesCXX_COMPILER_LAUNCHERandC_COMPILER_LAUNCHER. While there are the target-specific properties named<LANG>_COMPILER_LAUNCHER, cmake doesn't check for their use as global variables.This commit updates the build file to instead set the
CMAKE_<LANG>_COMPILER_LAUNCHERvariables, which are used as the default for the<LANG>_COMPILER_LAUNCHERproperty.