mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
cmake: Move ccache setup to another file
This commit is contained in:
parent
eb2eb4cd9b
commit
2cec77e9ec
@ -33,19 +33,7 @@ if(CMAKE_SYSTEM_PROCESSOR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Using ccache greatly improves the speed of our CI builds, let's enable for all.
|
||||
# Without this, our CI can't use ccache for clang, for some reason.
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND})
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_FOUND})
|
||||
|
||||
# ccache uses -I when compiling without preprocessor, which makes clang complain.
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||
endif()
|
||||
endif(CCACHE_FOUND)
|
||||
include(ccache)
|
||||
|
||||
# Remove soon?
|
||||
set(USE_FFMPEG ON)
|
||||
|
13
cmake/Modules/ccache.cmake
Normal file
13
cmake/Modules/ccache.cmake
Normal file
@ -0,0 +1,13 @@
|
||||
# Using ccache greatly improves the speed of our CI builds, let's enable for all.
|
||||
# Without this, our CI can't use ccache for clang, for some reason.
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND})
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_FOUND})
|
||||
|
||||
# ccache uses -I when compiling without preprocessor, which makes clang complain.
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
|
||||
endif()
|
||||
endif(CCACHE_FOUND)
|
Loading…
Reference in New Issue
Block a user