From 098cd6bb88b814850dcad2f29304c161047c9f05 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Fri, 17 Apr 2020 14:14:19 +1200 Subject: AppVeyor: use Ninja generator, cache vcpkg [skip travis] --- test/postinstall/test_cmake.bat | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 test/postinstall/test_cmake.bat (limited to 'test') diff --git a/test/postinstall/test_cmake.bat b/test/postinstall/test_cmake.bat new file mode 100755 index 00000000..8eba4e78 --- /dev/null +++ b/test/postinstall/test_cmake.bat @@ -0,0 +1,44 @@ +@echo off +:: Post-install tests with CMake +:: +:: First required argument is the installed prefix, which +:: is used to set CMAKE_PREFIX_PATH + +echo Running post-install tests with CMake + +set CMAKE_PREFIX_PATH=%1 +if not defined CMAKE_PREFIX_PATH ( + echo First positional argument CMAKE_PREFIX_PATH required + exit /B 1 +) + +echo CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH% + +cd %~dp0 + +cd testappprojinfo +del /f /q build 2> nul + +:: Check CMake project name PROJ +md build +cd build +cmake -GNinja -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH% ^ + -DUSE_PROJ_NAME=PROJ .. || exit /B 2 +ninja -v || exit /B 3 +ctest -VV || exit /B 4 +cd .. +del /f /q build + +:: Check legacy CMake project name PROJ4 +md build +cd build +cmake -GNinja -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH% ^ + -DUSE_PROJ_NAME=PROJ4 .. || exit /B 2 +ninja -v || exit /B 3 +ctest -VV || exit /B 4 +cd .. +del /f /q build + +cd .. -- cgit v1.2.3