From e24e2a8f8b62973cf446792b1dad0e61ae2da449 Mon Sep 17 00:00:00 2001 From: Vitor K Date: Mon, 10 Oct 2022 09:40:47 -0300 Subject: [PATCH] ccache: rename option as not to conflict with submodules (#6156) * ccache: rename option as not to conflict with submodules * MinGWCross: fix alignment --- .ci/linux-mingw/docker.sh | 2 +- .ci/windows-msvc/build.sh | 2 +- CMakeModules/MSVCCache.cmake | 8 ++++---- CMakeModules/MinGWCross.cmake | 10 +++++----- src/CMakeLists.txt | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.ci/linux-mingw/docker.sh b/.ci/linux-mingw/docker.sh index e08e57163..95f0b2720 100755 --- a/.ci/linux-mingw/docker.sh +++ b/.ci/linux-mingw/docker.sh @@ -5,7 +5,7 @@ mkdir -p "$HOME/.ccache/" echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf" mkdir build && cd build -cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MinGWCross.cmake" -DUSE_CCACHE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON -DCMAKE_NO_SYSTEM_FROM_IMPORTED=TRUE -DCOMPILE_WITH_DWARF=OFF +cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MinGWCross.cmake" -DCITRA_USE_CCACHE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON -DCMAKE_NO_SYSTEM_FROM_IMPORTED=TRUE -DCOMPILE_WITH_DWARF=OFF ninja echo "Tests skipped" diff --git a/.ci/windows-msvc/build.sh b/.ci/windows-msvc/build.sh index baf290405..19428b49b 100644 --- a/.ci/windows-msvc/build.sh +++ b/.ci/windows-msvc/build.sh @@ -1,7 +1,7 @@ #!/bin/sh -ex mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON +cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MSVCCache.cmake" -DCITRA_USE_CCACHE=ON -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON ninja # show the caching efficiency diff --git a/CMakeModules/MSVCCache.cmake b/CMakeModules/MSVCCache.cmake index 8848e35ea..1b64593a3 100755 --- a/CMakeModules/MSVCCache.cmake +++ b/CMakeModules/MSVCCache.cmake @@ -1,12 +1,12 @@ # buildcache wrapper -OPTION(USE_CCACHE "Use buildcache for compilation" OFF) -IF(USE_CCACHE) +OPTION(CITRA_USE_CCACHE "Use buildcache for compilation" OFF) +IF(CITRA_USE_CCACHE) FIND_PROGRAM(CCACHE buildcache) IF (CCACHE) MESSAGE(STATUS "Using buildcache found in PATH") SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE}) SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE}) ELSE(CCACHE) - MESSAGE(WARNING "USE_CCACHE enabled, but no buildcache executable found") + MESSAGE(WARNING "CITRA_USE_CCACHE enabled, but no buildcache executable found") ENDIF(CCACHE) -ENDIF(USE_CCACHE) +ENDIF(CITRA_USE_CCACHE) diff --git a/CMakeModules/MinGWCross.cmake b/CMakeModules/MinGWCross.cmake index a9bc0c85a..837f8faf8 100644 --- a/CMakeModules/MinGWCross.cmake +++ b/CMakeModules/MinGWCross.cmake @@ -20,17 +20,17 @@ SET(WINDRES ${MINGW_TOOL_PREFIX}windres) SET(ENV{PKG_CONFIG} ${MINGW_TOOL_PREFIX}pkg-config) # ccache wrapper -OPTION(USE_CCACHE "Use ccache for compilation" OFF) -IF(USE_CCACHE) +OPTION(CITRA_USE_CCACHE "Use ccache for compilation" OFF) +IF(CITRA_USE_CCACHE) FIND_PROGRAM(CCACHE ccache) IF (CCACHE) MESSAGE(STATUS "Using ccache found in PATH") SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE}) SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE}) ELSE(CCACHE) - MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found") + MESSAGE(WARNING "CITRA_USE_CCACHE enabled, but no ccache found") ENDIF(CCACHE) -ENDIF(USE_CCACHE) +ENDIF(CITRA_USE_CCACHE) # Search for programs in the build host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) @@ -47,7 +47,7 @@ IF(NOT DEFINED ENV{MINGW_DEBUG_INFO}) MESSAGE("* WINDRES : ${WINDRES}") MESSAGE("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}") MESSAGE("* STRIP : ${STRIP}") - MESSAGE("* USE_CCACHE : ${USE_CCACHE}") + MESSAGE("* CITRA_USE_CCACHE : ${CITRA_USE_CCACHE}") MESSAGE("") # So that the debug info only appears once SET(ENV{MINGW_DEBUG_INFO} SHOWN) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 617b919b7..e2d79f730 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,7 +70,7 @@ if (MSVC) # Since MSVC's debugging information is not very deterministic, so we have to disable it # when using ccache or other caching tools - if (NOT USE_CCACHE) + if (NOT CITRA_USE_CCACHE) add_compile_options( /Zi /Zo