-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update third-party actions to latest version * Use vcpkg in manifest mode * Only trim ccache after build * Use ccache with MSVC * Use Brewfile and cache Homebrew downloads * Use --print-config for ccache 3 * Attempt to make ccache actually work with MSVC * Zero ccache stats before building * Use SDL2 on macOS
- Loading branch information
Showing
6 changed files
with
233 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
brew "carla" | ||
brew "ccache" | ||
brew "fftw" | ||
brew "fltk" | ||
brew "fluid-synth" | ||
brew "jack" | ||
brew "lame" | ||
brew "libgig" | ||
brew "libogg" | ||
brew "libsamplerate" | ||
brew "libsndfile" | ||
brew "libsoundio" | ||
brew "libvorbis" | ||
brew "lilv" | ||
brew "lv2" | ||
brew "pkg-config" | ||
brew "portaudio" | ||
brew "qt@5" | ||
brew "sdl2" | ||
brew "stk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,40 @@ | ||
option(USE_COMPILE_CACHE "Use ccache or clcache for compilation" OFF) | ||
option(USE_COMPILE_CACHE "Use a compiler cache for compilation" OFF) | ||
|
||
# Compatibility for old option name | ||
if(USE_CCACHE) | ||
set(USE_COMPILE_CACHE ON) | ||
endif() | ||
|
||
if(USE_COMPILE_CACHE) | ||
if(MSVC) | ||
set(CACHE_TOOL_NAME clcache) | ||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|AppleClang|Clang)") | ||
set(CACHE_TOOL_NAME ccache) | ||
else() | ||
message(WARNING "Compile cache only available with MSVC or GNU") | ||
endif() | ||
if(NOT USE_COMPILE_CACHE) | ||
return() | ||
endif() | ||
|
||
find_program(CACHE_TOOL ${CACHE_TOOL_NAME}) | ||
if (CACHE_TOOL) | ||
message(STATUS "Using ${CACHE_TOOL} found for caching") | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CACHE_TOOL}) | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CACHE_TOOL}) | ||
else() | ||
message(WARNING "USE_COMPILE_CACHE enabled, but no ${CACHE_TOOL_NAME} found") | ||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "(GNU|AppleClang|Clang|MSVC)") | ||
message(WARNING "Compiler cache only available with MSVC or GNU") | ||
return() | ||
endif() | ||
|
||
set(CACHE_TOOL_NAME ccache) | ||
find_program(CACHE_TOOL "${CACHE_TOOL_NAME}") | ||
if(NOT CACHE_TOOL) | ||
message(WARNING "USE_COMPILE_CACHE enabled, but no ${CACHE_TOOL_NAME} found") | ||
return() | ||
endif() | ||
|
||
if(MSVC) | ||
# ccache doesn't support debug information in the PDB format. Setting the | ||
# debug information format requires CMP0141, introduced with CMake 3.25, to | ||
# be set to NEW prior to the initial `project` command. | ||
if(CMAKE_VERSION VERSION_LESS "3.25") | ||
message(WARNING "Use of compiler cache with MSVC requires at least CMake 3.25") | ||
return() | ||
endif() | ||
|
||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>") | ||
endif() | ||
|
||
message(STATUS "Using ${CACHE_TOOL} for compiler caching") | ||
|
||
# TODO CMake 3.21: Use CMAKE_<LANG>_<COMPILER|LINKER>_LAUNCHER variables instead | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CACHE_TOOL}") | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CACHE_TOOL}") |
Oops, something went wrong.