From 1c8a19f7c95250fbe3b38d3b3b7305d30885f7c0 Mon Sep 17 00:00:00 2001 From: manongjohn <19245851+manongjohn@users.noreply.github.com> Date: Mon, 12 Dec 2022 21:01:34 -0500 Subject: [PATCH] Configure ccache for Windows builds --- .github/workflows/windows_build.yml | 11 ++++++++++- ci-scripts/windows/tahoma-build.bat | 7 ++++++- toonz/sources/CMakeLists.txt | 6 +++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 615a0c0c..a63c7dbd 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -12,6 +12,15 @@ jobs: - name: Install Dependencies run: | ci-scripts\windows\tahoma-install.bat + choco install ccache + copy C:\ProgramData\chocolatey\lib\ccache\tools\ccache*\ccache.exe C:\ProgramData\chocolatey\bin\cl.exe + mkdir %LOCALAPPDATA%\ccache + - uses: actions/cache@v3 + with: + path: | + ~/AppData/Local/ccache + key: ${{ runner.os }}-${{ github.sha }} + restore-keys: ${{ runner.os }}- - name: Get CanonSDK if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' }} run: | @@ -85,7 +94,7 @@ jobs: name: ${{ env.NIGHTLYDATETIME }} omitBodyDuringUpdate: true omitNameDuringUpdate: true - owner: tahoma2d + owner: tahoma2d prerelease: true replacesArtifacts: true repo: tahoma2d_nightlies diff --git a/ci-scripts/windows/tahoma-build.bat b/ci-scripts/windows/tahoma-build.bat index c8f23782..19a4cb04 100644 --- a/ci-scripts/windows/tahoma-build.bat +++ b/ci-scripts/windows/tahoma-build.bat @@ -30,6 +30,11 @@ IF EXIST ..\..\thirdparty\crashrpt\include set WITH_CRASHRPT=Y cmake ..\sources -G %MSVCVERSION% -Ax64 -DQT_PATH=%QT_PATH% -DBOOST_ROOT=%BOOST_ROOT% -DOpenCV_DIR=%OPENCV_DIR% -DWITH_CANON=%WITH_CANON% -DWITH_CRASHRPT=%WITH_CRASHRPT% -msbuild /property:Configuration=RelWithDebInfo /m /verbosity:minimal ALL_BUILD.vcxproj + +IF EXIST C:\ProgramData\chocolatey\bin\cl.exe ( + msbuild /p:CLToolPath=C:\ProgramData\chocolatey\bin /p:UseMultiToolTask=true /p:Configuration=RelWithDebInfo /m /verbosity:minimal ALL_BUILD.vcxproj +) ELSE ( + msbuild /p:Configuration=RelWithDebInfo /m /verbosity:minimal ALL_BUILD.vcxproj +) cd ../.. diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index be1b8aa4..96f09f11 100644 --- a/toonz/sources/CMakeLists.txt +++ b/toonz/sources/CMakeLists.txt @@ -1,4 +1,7 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_policy(SET CMP0141 NEW) +set(CMAKE_POLICY_DEFAULT_CMP0141 NEW) + +cmake_minimum_required(VERSION 2.8.11) set(CMAKE_BUILD_TYPE_INIT Release) @@ -143,6 +146,7 @@ if(BUILD_ENV_MSVC) -DNOMINMAX -D_USE_MATH_DEFINES ) + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>") elseif(BUILD_ENV_APPLE) if(NOT PLATFORM) set(PLATFORM 64)