diff --git a/.ci/linux-mingw/docker.sh b/.ci/linux-mingw/docker.sh index e08e57163e..95f0b27209 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 baf2904052..19428b49ba 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 8848e35ead..1b64593a3a 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 a9bc0c85a4..837f8faf86 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 617b919b78..e2d79f730a 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