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

Add ccache to the build if available #553

Merged
merged 3 commits into from
Apr 23, 2018

Conversation

LiquidityC
Copy link
Contributor

Added ccache to the build to benefit those who have it installed. But it comes bundled in most Linux package managers and really speeds up successive compiles. There should be no impact if you don't have ccache installed.

Also enabled ccache in TravisCI.

Also enables ccache in TravisCI
@cxong
Copy link
Owner

cxong commented Apr 22, 2018

Seems that linux + clang build is failing, but might be a ccache + clang bug (http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html)
This could be fixed by having clang ignore unused arguments -Qunused-arguments, setting envvar CCACHE_CPP2=yes (http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html), or using an updated ccache which fixes this bug (https://bugzilla.samba.org/show_bug.cgi?id=8118 version 3.2). I can look into this when I next get time and access to a linux environment, or do you have time?

@LiquidityC
Copy link
Contributor Author

LiquidityC commented Apr 22, 2018 via email

@LiquidityC
Copy link
Contributor Author

Ok, didn't realize that there were multiple CMakeLists.txt files. I'll need to fiddle more than I thought. I'll try again later 😃

CMakeLists.txt Outdated
link_directories(${SDL2_LIBRARY_DIRS} ${SDL2_IMAGE_LIBRARY_DIRS} ${SDL2_MIXER_LIBRARY_DIRS})

if(CCACHE_FOUND)
set(ENV{CCACHE_CPP2} "yes")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
Copy link
Owner

Choose a reason for hiding this comment

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

use CLANG; see line 33

@cxong cxong merged commit 9f11a09 into cxong:master Apr 23, 2018
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.

2 participants