forked from USCiLab/cereal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tusharpm-develop' into develop
see USCiLab#373 Still need to address why windows needed a modifcation to polymorphic test to compile
- Loading branch information
Showing
8 changed files
with
158 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# can use variables like {build} and {branch} | ||
version: 1.2.{build} | ||
pull_requests: | ||
do_not_increment_build_number: true | ||
|
||
branches: | ||
only: | ||
- develop | ||
|
||
configuration: | ||
- Debug | ||
- Release | ||
|
||
environment: | ||
matrix: | ||
- VS_VERSION_MAJOR: 12 | ||
- VS_VERSION_MAJOR: 14 | ||
BOOST_ROOT: C:\Libraries\boost_1_59_0 | ||
|
||
platform: | ||
- Win32 | ||
- x64 | ||
|
||
before_build: "scripts\\appveyor.bat" | ||
|
||
build: | ||
parallel: true | ||
project: build/cereal.sln | ||
verbosity: minimal | ||
|
||
test_script: "scripts\\appveyor.bat test" | ||
|
||
artifacts: | ||
- path: build\Testing | ||
- path: out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
if not defined APPVEYOR ( | ||
@echo This script is meant to be used with AppVeyor CI. This can be used as reference. | ||
@echo I sincerely recommend not using it for building/testing cereal locally. | ||
exit /b 0 | ||
) | ||
|
||
if not defined BOOST_ROOT ( | ||
set BOOST_ROOT=C:\Libraries\boost | ||
) | ||
if not defined VS_VERSION_MAJOR ( | ||
set VS_VERSION_MAJOR=14 | ||
) | ||
if not defined VS_VERSION_YEAR ( | ||
if "%VS_VERSION_MAJOR%" == "12" ( | ||
set VS_VERSION_YEAR=2013 | ||
) else if "%VS_VERSION_MAJOR%" == "14" ( | ||
set VS_VERSION_YEAR=2015 | ||
) else ( | ||
@echo Cannot use Visual Studio version %VS_VERSION_MAJOR% | ||
exit /b 1 | ||
) | ||
) | ||
if not defined CMAKE_GENERATOR_PREFIX ( | ||
set CMAKE_GENERATOR_PREFIX=Visual Studio %VS_VERSION_MAJOR% %VS_VERSION_YEAR% | ||
) | ||
|
||
@rem CONFIGURATION is (one of the entries) defined in appveyor.yml | ||
if not defined CONFIGURATION ( | ||
set CONFIGURATION=Release | ||
) | ||
@rem PLATFORM is (one of the entries) defined in appveyor.yml | ||
if "%PLATFORM%"=="x64" ( | ||
set BIT_COUNT=64 | ||
set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_PREFIX% Win64 | ||
) else ( | ||
set BIT_COUNT=32 | ||
set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_PREFIX% | ||
) | ||
|
||
set BOOST_LIBRARYDIR=%BOOST_ROOT%\lib%BIT_COUNT%-msvc-%VS_VERSION_MAJOR%.0 | ||
|
||
set START_DIR=%CD% | ||
|
||
if not exist build\NUL mkdir build | ||
cd build | ||
|
||
if "%~1" == "test" ( | ||
@rem overloading the batch script; Run tests if the first argument is `test` (without quotes). | ||
@rem Cereal uses Boost Unit test framework. Rather than modifying the code to load boost test | ||
@rem dll from its location OR copying the boost dlls to the directory of every test being run, | ||
@rem we use another option Windows leaves us - modify the PATH. | ||
for %%i in (ctest.exe) do set CTEST_EXE=%%~$PATH:i | ||
PATH %BOOST_LIBRARYDIR% | ||
"!CTEST_EXE!" -C %CONFIGURATION% | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
goto done | ||
) | ||
|
||
if "%PLATFORM%" == "x64" ( | ||
@rem please excuse the hack - CMake is unable to produce multiarch MSVC projects | ||
cmake -G "%CMAKE_GENERATOR_PREFIX%" -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% .. | ||
cmake --build . --config %CONFIGURATION% --target portability_test32 | ||
del CMakeCache.txt | ||
rmdir /s /q CMakeFiles | ||
) | ||
|
||
cmake -G "%CMAKE_GENERATOR_NAME%" -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% .. | ||
@rem left the actual build for later - AppVeyor enables parallel jobs in a much cleaner way than msbuild | ||
|
||
:done | ||
@REM go back home | ||
cd %START_DIR% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
macro(EXEC_CMD_CHECK) | ||
message("running ${ARGN}") | ||
execute_process(COMMAND ${ARGN} RESULT_VARIABLE CMD_RESULT) | ||
if(CMD_RESULT) | ||
message(FATAL_ERROR "Error running ${ARGN}") | ||
endif() | ||
endmacro() | ||
|
||
set(PORTABILITY_TEST_32 "${PORTABILITY_TEST_DIR}/portability_test32") | ||
set(PORTABILITY_TEST_64 "${PORTABILITY_TEST_DIR}/portability_test64") | ||
|
||
exec_cmd_check(${PORTABILITY_TEST_64} save 64) | ||
exec_cmd_check(${PORTABILITY_TEST_32} load 32) | ||
exec_cmd_check(${PORTABILITY_TEST_32} save 32) | ||
exec_cmd_check(${PORTABILITY_TEST_64} load 64) | ||
exec_cmd_check(${PORTABILITY_TEST_64} remove 64) |
This file was deleted.
Oops, something went wrong.