mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 16:46:16 +00:00
Fix sccache
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -52,6 +52,14 @@ jobs:
|
||||
sudo update-alternatives --set cc /usr/bin/clang-${{ env.LLVM_VERSION }}
|
||||
sudo update-alternatives --set c++ /usr/bin/clang++-${{ env.LLVM_VERSION }}
|
||||
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.8
|
||||
|
||||
- name: Setup Environment Variables
|
||||
shell: bash
|
||||
run: |
|
||||
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
|
||||
|
||||
- name: CMake Build
|
||||
run: cmake --preset=release -DMOMO_ENABLE_CLANG_TIDY=On && cmake --build --preset=release
|
||||
|
||||
|
||||
@@ -203,8 +203,8 @@ set(OPT_DEBUG "-O0 -g")
|
||||
set(OPT_RELEASE "-O3 -g")
|
||||
|
||||
if(MSVC)
|
||||
set(OPT_DEBUG "/Od /Ob0 /Zi")
|
||||
set(OPT_RELEASE "/O2 /Ob2 /Zi")
|
||||
set(OPT_DEBUG "/Od /Ob0 /Z7")
|
||||
set(OPT_RELEASE "/O2 /Ob2 /Z7")
|
||||
|
||||
add_link_options(/DEBUG)
|
||||
endif()
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
include_guard()
|
||||
|
||||
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
find_program(SCCACHE sccache REQUIRED)
|
||||
find_program(SCCACHE sccache)
|
||||
|
||||
if (SCCACHE)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE})
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE})
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
|
||||
|
||||
if(POLICY CMP0141)
|
||||
cmake_policy(SET CMP0141 NEW)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user