Add more CMake toolset types to appveyor.bat

This commit is contained in:
Tobias Taschner
2016-11-03 21:28:26 +01:00
parent 9338e68371
commit b8706dac1c

View File

@@ -45,37 +45,100 @@ bash -lc "g++ --version"
bash -lc "LDFLAGS=-L/usr/lib/w32api ./configure --disable-optimise --disable-shared && make -j3" bash -lc "LDFLAGS=-L/usr/lib/w32api ./configure --disable-optimise --disable-shared && make -j3"
goto :eof goto :eof
:cmake_msys
if "%MSYSTEM%"=="" set MSYSTEM=MINGW32
path C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%path%
set GENERATOR=MSYS Makefiles
set SKIPTESTS=1
set SKIPINSTALL=1
set CMAKE_BUILD_FLAGS=-- -j3
goto cmake
:cmake_cygwin
C:\cygwin\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P libjpeg-devel -P libpng-devel -P libtiff-devel -P libexpat-devel
path c:\cygwin\bin;%path%
set GENERATOR=Unix Makefiles
set SKIPTESTS=1
set SKIPINSTALL=1
set CMAKE_BUILD_FLAGS=-- -j3
goto cmake
:cmake_mingw
:: CMake requires a path without sh (added by git on AppVeyor)
path C:\Program Files (x86)\CMake\bin;C:\MinGW\bin
set GENERATOR=MinGW Makefiles
set SKIPTESTS=1
set CMAKE_BUILD_FLAGS=-- -j3
goto cmake
:cmake :cmake
echo --- Tools versions: echo --- Tools versions:
cmake --version | head -1 cmake --version
if "%SHARED%"=="" set SHARED=ON
if "%CONFIGURATION%"=="" set CONFIGURATION=Release
if "%SKIPTESTS%"=="1" (
set BUILD_TESTS=OFF
) else (
set BUILD_TESTS=CONSOLE_ONLY
)
echo. echo.
echo --- Generating project files echo --- Generating project files
echo. echo.
set WX_INSTALL_PATH=%HOMEDRIVE%%HOMEPATH%\wx_install_target set WX_INSTALL_PATH=%HOMEDRIVE%%HOMEPATH%\wx_install_target
mkdir %WX_INSTALL_PATH% mkdir %WX_INSTALL_PATH%
mkdir build_cmake_vs mkdir build_cmake
pushd build_cmake_vs pushd build_cmake
cmake -G "%GENERATOR%" -DCMAKE_INSTALL_PREFIX=%WX_INSTALL_PATH% -DwxBUILD_SHARED=%SHARED% .. cmake -G "%GENERATOR%" -DwxBUILD_TESTS=%BUILD_TESTS% -DCMAKE_INSTALL_PREFIX=%WX_INSTALL_PATH% -DwxBUILD_SHARED=%SHARED% %CMAKE_CONFIGURE_FLAGS% ..
if ERRORLEVEL 1 goto error
echo. echo.
echo --- Starting the build echo --- Starting the build
echo. echo.
cmake --build . --config %CONFIGURATION% cmake --build . --config %CONFIGURATION% %CMAKE_BUILD_FLAGS%
echo. if ERRORLEVEL 1 goto error
echo --- Installing
echo.
cmake --build . --config %CONFIGURATION% --target install
popd
echo. :: Package binaries as artifact
echo --- Test installed library where 7z
echo. if ERRORLEVEL 1 goto cmake_test
set WXWIN=%WX_INSTALL_PATH% 7z a -r wxWidgets_Binaries.zip lib/*.*
mkdir build_cmake_install_test appveyor PushArtifact wxWidgets_Binaries.zip
pushd build_cmake_install_test
echo --- Configure minimal sample :cmake_test
cmake -G "%GENERATOR%" ..\samples\minimal if NOT "%SKIPTESTS%"=="1" (
echo --- Building minimal sample with installed library echo.
cmake --build . --config %CONFIGURATION% echo --- Running tests
echo.
ctest -V -C %CONFIGURATION% --interactive-debug-mode 0 .
if ERRORLEVEL 1 goto error
)
if NOT "%SKIPINSTALL%"=="1" (
echo.
echo --- Installing
echo.
cmake --build . --config %CONFIGURATION% --target install
if ERRORLEVEL 1 goto error
popd
echo.
echo --- Test installed library
echo.
set WXWIN=%WX_INSTALL_PATH%
mkdir build_cmake_install_test
pushd build_cmake_install_test
echo --- Configure minimal sample
cmake -G "%GENERATOR%" ..\samples\minimal
if ERRORLEVEL 1 goto error
echo --- Building minimal sample with installed library
cmake --build . --config %CONFIGURATION%
if ERRORLEVEL 1 goto error
popd
)
popd popd
goto :eof goto :eof
:error
echo.
echo --- Build failed !
echo.