Skip to content

Commit

Permalink
try wo ccache
Browse files Browse the repository at this point in the history
  • Loading branch information
mradugin authored Jul 14, 2024
1 parent 744d771 commit 6ded81d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:

matrix:
sys:
- { os: windows-latest, shell: 'msys2 {0}', generator: Ninja }
- { os: windows-latest, shell: 'msys2 {0}', generator: Ninja }
- { os: windows-latest, shell: 'msys2 {0}', generator: Unix Makefiles }

- { os: ubuntu-latest, shell: bash, generator: Ninja }
- { os: ubuntu-latest, shell: bash, generator: Ninja }
- { os: ubuntu-latest, shell: bash, generator: Unix Makefiles }

- { os: macos-latest, shell: bash, generator: Ninja }
- { os: macos-latest, shell: bash, generator: Ninja }
- { os: macos-latest, shell: bash, generator: Unix Makefiles }

compiler:
Expand All @@ -32,10 +32,10 @@ jobs:
build_type: [Debug]

include:
- sys: { os: windows-latest, shell: bash, generator: Visual Studio 17 2022 }
compiler: { c: cl, cpp: cl }
- sys: { os: windows-latest, shell: bash, generator: Visual Studio 17 2022 }
compiler: { c: cl, cpp: cl }
build_type: Debug
- sys: { os: macos-latest, shell: bash, generator: Xcode }
- sys: { os: macos-latest, shell: bash, generator: Xcode }
compiler: { c: clang, cpp: clang++ }
build_type: Debug

Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -S "${{ steps.strings.outputs.source-dir }}" -B "${{ steps.strings.outputs.build-output-dir }}" -G "${{matrix.sys.generator}}"
- name: Build (no cache)
- name: Build (empty cache)
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: |
cmake --build "${{ steps.strings.outputs.build-output-dir }}" --config ${{ matrix.build_type }} --verbose
Expand Down
4 changes: 2 additions & 2 deletions Findccache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ if (CCACHE_FOUND)
)
elseif(CMAKE_GENERATOR MATCHES "Ninja" OR CMAKE_GENERATOR MATCHES "Unix Makefiles")
# Support Unix Makefiles and Ninja
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
#set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
#set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
else()
message(WARNING "Unsupported generator for compiler cache: ${CMAKE_GENERATOR}")
set(CCACHE_SUPPORTED NO)
Expand Down

0 comments on commit 6ded81d

Please sign in to comment.