-
Notifications
You must be signed in to change notification settings - Fork 192
Set RULE_LAUNCH_COMPILE/LINK to ccache if CMAKE_VERSION < 3.4 #2738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution. I think the approach like https://github.com/apache/tvm/pull/8373/files , adding |
@mqcmd196 Thank you for the reply.
This is for sure another way for the update, however it overwrites the variable to |
I see, so you mean that advanced users who want to use ccache can specify ccache on the command line themselves. And this PR only guarantees backward compatibility, right? |
Yes. If you think this change is inconvenient for the existing users, it's also a good idea to add a variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Since the use of
RULE_LAUNCH_COMPILE
/RULE_LAUNCH_LINK
is not recommended at least from CMake version 3.4, I added a condition to useset_property
only if the cmake version is more than or equal to 3.4, where the variableCXX_COMPILE_LAUNCHER
is introduced.ref:
https://cmake.org/cmake/help/latest/prop_gbl/RULE_LAUNCH_COMPILE.html
https://cmake.org/cmake/help/latest/prop_tgt/LANG_COMPILER_LAUNCHER.html#prop_tgt:%3CLANG%3E_COMPILER_LAUNCHER