1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
:: Template to set environment variables for the
:: non-regression testing framework.
set VORPALINE_SOURCE_DIR=@CMAKE_SOURCE_DIR.PATH@
set VORPALINE_BUILD_DIR=@CMAKE_BINARY_DIR.PATH@
set VORPALINE_BIN_DIR=@CMAKE_RUNTIME_OUTPUT_DIRECTORY.PATH@
set VORPALINE_LIB_DIR=@CMAKE_LIBRARY_OUTPUT_DIRECTORY.PATH@
set VORPATEST_ROOT_DIR=@CMAKE_SOURCE_DIR.PATH@/tests
set DATADIR=@CMAKE_SOURCE_DIR.PATH@/tests/data
:: set PATH=%PATH%;%VORPALINE_BIN_DIR%
:: Parse arguments
:: If the build directory contains a Makefile, we are in a single build
:: configuration determined at configuration time.
:: Otherwise, we are in a multi-build configuration and the caller must
:: specify which configuration on the command line to use with option --config
if exist %VORPALINE_BUILD_DIR%/Makefile (
set VORPALINE_BUILD_CONFIG=@CMAKE_BUILD_TYPE@
) else (
if "%1" == "--config" (
call :set_config %2
shift
shift
) else (
echo Error: option --config BUILD_CONFIG must be specified as first argument,
echo where BUILD_CONFIG is the cmake build configuration to use
exit /B 1
)
)
:: Swallow the remaining arguments
:options
if "%1" == "" goto :eof
set args=%args% %1
shift
goto options
:: Set Vorpaline executables
:set_config
set VORPALINE_BUILD_CONFIG=%1
set VORPALINE_BIN_DIR=%VORPALINE_BIN_DIR%\%1
set VORPALINE_LIB_DIR=%VORPALINE_LIB_DIR%\%1
goto :eof
|