enabled ccache in CMakeLists.txt for client project

This commit is contained in:
vladimir.kuznetsov 2022-12-29 08:40:40 +03:00
parent 788539973f
commit 3e650cf731
2 changed files with 18 additions and 20 deletions

View file

@ -27,15 +27,15 @@ jobs:
set-env: 'true' set-env: 'true'
extra: '--external 7z' extra: '--external 7z'
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Get sources' - name: 'Get sources'
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
submodules: 'true' submodules: 'true'
fetch-depth: 10 fetch-depth: 10
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Build project' - name: 'Build project'
run: | run: |
export QT_BIN_DIR=${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/gcc_64/bin export QT_BIN_DIR=${{ runner.temp }}/Qt/${{ env.QT_VERSION }}/gcc_64/bin
@ -61,15 +61,6 @@ jobs:
BUILD_ARCH: 64 BUILD_ARCH: 64
steps: steps:
- name: 'Get sources'
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 10
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Install Qt' - name: 'Install Qt'
uses: jurplel/install-qt-action@v3 uses: jurplel/install-qt-action@v3
with: with:
@ -87,7 +78,16 @@ jobs:
- name: 'Setup mvsc' - name: 'Setup mvsc'
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
with: with:
arch: 'x64' arch: 'x64'
- name: 'Setup ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Get sources'
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 10
- name: 'Build project' - name: 'Build project'
shell: cmd shell: cmd

View file

@ -37,13 +37,11 @@ if(IOS)
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif() endif()
set(IS_CI ${CI}) find_program(CCACHE_FOUND ccache)
if(IS_CI) if(CCACHE_FOUND)
message("Detected CI env") message("found ccache")
find_program(CCACHE "ccache") set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
if(CCACHE) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE}")
endif()
endif() endif()
include(${CMAKE_CURRENT_LIST_DIR}/cmake/3rdparty.cmake) include(${CMAKE_CURRENT_LIST_DIR}/cmake/3rdparty.cmake)