From ef3af655c6f9ee10536da3a4a85416968e449cc4 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 2 Sep 2019 22:02:44 +0200 Subject: [PATCH] AppVeyor: Improve use of CMake --- appveyor.yml | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c332ad48..a568ec74 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -54,122 +54,142 @@ environment: # Visual Studio 2010 Win32 - GENERATOR: Visual Studio 10 2010 PLATFORM: Win32 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2010 Win32 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 10 2010 PLATFORM: Win32 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2010 x64 - GENERATOR: Visual Studio 10 2010 Win64 PLATFORM: x64 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2010 x64 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 10 2010 Win64 PLATFORM: x64 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2012 Win32 - GENERATOR: Visual Studio 11 2012 PLATFORM: Win32 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2012 Win32 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 11 2012 PLATFORM: Win32 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2012 x64 - GENERATOR: Visual Studio 11 2012 Win64 PLATFORM: x64 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2012 x64 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 11 2012 Win64 PLATFORM: x64 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2013 Win32 - GENERATOR: Visual Studio 12 2013 PLATFORM: Win32 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2013 Win32 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 12 2013 PLATFORM: Win32 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2013 x64 - GENERATOR: Visual Studio 12 2013 Win64 PLATFORM: x64 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2013 x64 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 12 2013 Win64 PLATFORM: x64 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # Visual Studio 2015 Win32 - GENERATOR: Visual Studio 14 2015 PLATFORM: Win32 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # Visual Studio 2015 Win32 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 14 2015 PLATFORM: Win32 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # Visual Studio 2015 x64 - GENERATOR: Visual Studio 14 2015 Win64 PLATFORM: x64 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # Visual Studio 2015 x64 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 14 2015 Win64 PLATFORM: x64 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # Visual Studio 2017 Win32 - GENERATOR: Visual Studio 15 2017 PLATFORM: Win32 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 # Visual Studio 2017 Win32 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 15 2017 PLATFORM: Win32 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 # Visual Studio 2017 x64 - GENERATOR: Visual Studio 15 2017 Win64 PLATFORM: x64 + EXPAT_DLL: expatd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 # Visual Studio 2017 x64 XML_UNICODE_WCHAR_T - GENERATOR: Visual Studio 15 2017 Win64 PLATFORM: x64 - CFLAGS: -DXML_UNICODE -DXML_UNICODE_WCHAR_T + CMAKE_ARGS: -DEXPAT_UNICODE=ON -DEXPAT_UNICODE_WCHAR_T=ON + EXPAT_DLL: expatwd.dll APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 before_build: - echo Running cmake... - cd c:\projects\libexpat - - cmake -DEXPAT_WARNINGS_AS_ERRORS=ON -G"%GENERATOR%" expat + - cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_WARNINGS_AS_ERRORS=ON %CMAKE_ARGS% expat build: parallel: true # enable MSBuild parallel builds project: expat.sln # path to Visual Studio solution or project test_script: - - cp Debug\expatd.dll tests\Debug - - tests\Debug\runtests.exe + - cp %CONFIGURATION%\\%EXPAT_DLL% tests\\%CONFIGURATION%\\ + - ctest --build-config %CONFIGURATION% --output-on-failure --parallel 2