Merge pull request #1108 from manongjohn/enable_windows_ccache

Configure ccache for Windows builds
This commit is contained in:
manongjohn 2022-12-13 08:24:53 -05:00 committed by GitHub
commit b1cd74020c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View file

@ -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: |

View file

@ -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 ../..

View file

@ -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 "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
elseif(BUILD_ENV_APPLE)
if(NOT PLATFORM)
set(PLATFORM 64)