Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Appveyor] attempt to use sccache #1127

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ version: '{build}'

os:
- Visual Studio 2022
- Visual Studio 2019
- Visual Studio 2015

platform:
- x64
Expand All @@ -26,17 +24,38 @@ build:

environment:
CMAKE_INSTALL_PREFIX: C:\projects\stir\install\
DEPS: C:\projects\deps
sccache_VER: 0.3.3

install:
- IF NOT EXIST %DEPS% mkdir %DEPS%
- cd %DEPS%
- set sccache_FULLNAME="sccache-v%sccache_VER%-x86_64-pc-windows-msvc"
- set sccache_URL="https://github.com/mozilla/sccache/releases/download/v%sccache_VER%/%sccache_FULLNAME%.zip"
- IF NOT EXIST %DEPS%\sccache-%sccache_VER%.zip appveyor DownloadFile %sccache_URL% -FileName sccache-%sccache_VER%.zip
- IF NOT EXIST %DEPS%\sccache.exe 7z x sccache-%sccache_VER%.zip -o%DEPS%\
- IF NOT EXIST %DEPS%\sccache.exe move %sccache_FULLNAME%\*.* .

build_script:
- cd C:\projects\STIR
- REM path=%path%;%DEPS%
- REM sccache --show-stats
# find boost on Appveyor. Version depends on VM
- for /D %%d in (C:\Libraries\boost_*) do set BOOST_ROOT=%%d
- echo Using Boost %BOOST_ROOT%
- mkdir build
- mkdir install
- cd build
- cmake.exe .. -DCMAKE_INSTALL_PREFIX="C:\projects\stir\install" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_CONFIGURATION_TYPES=%CONFIGURATION% -DSTIR_OPENMP:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=OFF
- cmake --version
- cmake.exe .. -G Ninja -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_CONFIGURATION_TYPES=%CONFIGURATION% -DSTIR_OPENMP=ON -DBUILD_DOCUMENTATION:BOOL=OFF
- REM DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- cmake.exe --build . --config %CONFIGURATION%
- cmake.exe --build . --target install --config %CONFIGURATION%
- REM sccache --show-stats

cache:
- c:\projects\deps\sccache-%sccache_VER%.zip
# - C:\Users\appveyor\AppData\Local\Mozilla\sccache\cache

test_script:
- cd C:\projects\stir\build
Expand Down
6 changes: 1 addition & 5 deletions src/buildblock/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,7 @@ static char *posixly_correct;
# define my_index strchr
#else

# if HAVE_STRING_H || WIN32 /* Pete Wilson mod 7/28/02 */
# include <string.h>
# else
# include <strings.h>
# endif
#include <string.h>

/* Avoid depending on library functions or files
whose names are inconsistent. */
Expand Down