1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-30 07:48:26 +00:00

add ccache option in before_script.msvc.sh

This commit is contained in:
psi29a 2021-09-16 15:47:41 +00:00 committed by Bret Curtis
parent cbb1b48183
commit 383e2499fe
2 changed files with 14 additions and 5 deletions

View file

@ -375,13 +375,14 @@ variables: &tests-targets
- $time = (Get-Date -Format "HH:mm:ss")
- echo ${time}
- echo "started by ${GITLAB_USER_NAME}"
- sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N -b -t
- export CCACHE_BASEDIR="`pwd`"
- export CCACHE_DIR="`pwd`/ccache"
- mkdir -pv "$CCACHE_DIR"
- ccache -z -M "${CCACHE_SIZE}"
- sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N -b -t -f
- cd MSVC2019_64_Ninja
- .\ActivateMSVC.ps1
- export CCACHE_BASEDIR="`pwd`"
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
- ccache -z -M "${CCACHE_SIZE}"
- cmake --build . --config $config --target ($targets.Split(',')) -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- cmake --build . --config $config --target ($targets.Split(','))
- cd $config
- echo "CI_COMMIT_REF_NAME ${CI_COMMIT_REF_NAME}`nCI_JOB_ID ${CI_JOB_ID}`nCI_COMMIT_SHA ${CI_COMMIT_SHA}" | Out-File -Encoding UTF8 CI-ID.txt
- Get-ChildItem -Recurse *.ilk | Remove-Item

View file

@ -62,6 +62,7 @@ VERBOSE=""
STRIP=""
SKIP_DOWNLOAD=""
SKIP_EXTRACT=""
USE_CCACHE=""
KEEP=""
UNITY_BUILD=""
VS_VERSION=""
@ -100,6 +101,8 @@ while [ $# -gt 0 ]; do
e )
SKIP_EXTRACT=true ;;
f )
USE_CCACHE=TRUE ;;
k )
KEEP=true ;;
@ -149,6 +152,8 @@ Options:
Skip checking the downloads.
-e
Skip extracting dependencies.
-f
Use ccache
-h
Show this message.
-k
@ -503,6 +508,9 @@ if ! [ -z $UNITY_BUILD ]; then
add_cmake_opts "-DOPENMW_UNITY_BUILD=True"
fi
if ! [ -z $USE_CCACHE ]; then
add_cmake_opts " -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
echo
echo "==================================="
echo "Starting prebuild on MSVC${MSVC_DISPLAY_YEAR} WIN${BITS}"