Skip to content
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

Added support ccache for speedup compilation on Linux #2267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GermanAizek
Copy link

Copy link
Contributor

@cdavis5e cdavis5e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Historically, CMake build systems that use ccache(1) automatically have caused problems for me, e.g. when installing ports from source in MacPorts. Then again, I suppose it's easy enough to work around that with -DCCACHE_FOUND=NO.

@@ -88,6 +88,12 @@ else()
message(STATUS "SPIRV-Cross: Git not found, using unknown build version.")
endif()

find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the find_program() above, the variable CCACHE_FOUND will contain the full pathname of the ccache program. You should probably use it, instead of assuming that ccache will be in the user's PATH.

@HansKristian-Work
Copy link
Contributor

HansKristian-Work commented Jan 18, 2024

Is there really a point adding this? This isn't a massive project where ccache really helps. At the very least, it should be opt-in, not enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants