diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 903bfc27b99..1f6e1a37833 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,9 +34,10 @@ jobs: shell: cmd env: + ARTIFACT: QGroundControl-installer.exe QT_VERSION: 6.6.3 GST_VERSION: 1.22.11 - ARTIFACT: QGroundControl-installer.exe + SCCACHE_GHA_ENABLED: "true" steps: - name: Checkout repo @@ -48,7 +49,7 @@ jobs: - name: Install Dependencies run: | - choco install --no-progress sccache ninja -y + choco install --no-progress ninja sccache -y choco install --no-progress cmake --installargs 'ADD_CMAKE_TO_PATH=System' --apply-install-arguments-to-dependencies - name: Install Vulkan @@ -68,7 +69,6 @@ jobs: - name: Set Up Cache uses: hendrikmuhs/ccache-action@v1.2 with: - create-symlink: true key: ${{ runner.os }}-${{ matrix.BuildType }} restore-keys: ${{ runner.os }}-${{ matrix.BuildType }} max-size: 1G diff --git a/CMakeLists.txt b/CMakeLists.txt index 7eb657d1f1c..35c2015efd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,13 +78,20 @@ if(UNIX) set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM}) endif() elseif(WIN32) - # find_program(SCCACHE_PROGRAM sccache) + find_program(SCCACHE_PROGRAM sccache) if(SCCACHE_PROGRAM) message(STATUS "Using SCCache") set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE_PROGRAM}) set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE_PROGRAM}) if(MSVC) - string(APPEND CMAKE_CXX_FLAGS " /FS") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") + elseif(CMAKE_BUILD_TYPE STREQUAL "Release") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + endif() + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded) endif() endif() endif()