summaryrefslogtreecommitdiff
path: root/Utilities/Release/win/x86/test/test-nmake.bat
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-05 14:51:04 -0400
committerBrad King <brad.king@kitware.com>2020-05-05 14:56:26 -0400
commitff929badb300800f5beecc921067456c0ae9842f (patch)
treed5caaf263542ce470f049570d271eaa47fd1cfee /Utilities/Release/win/x86/test/test-nmake.bat
parent5f4f7e637a515d7fb9c6f5344169c37dc9d78a7f (diff)
downloadcmake-ff929badb300800f5beecc921067456c0ae9842f.tar.gz
Utilities/Release: Add docker specs to build and test Windows binaries
These will allow anyone to produce portable binaries like those published on `cmake.org`. Follow the pattern from commit facc240a45 (Utilities/Release: Add docker specs to build and test Linux binaries, 2019-08-23, v3.16.0-rc1~184^2~2). Parameterize the architecture to support both `x86_64` and `i386`.
Diffstat (limited to 'Utilities/Release/win/x86/test/test-nmake.bat')
-rwxr-xr-xUtilities/Release/win/x86/test/test-nmake.bat19
1 files changed, 19 insertions, 0 deletions
diff --git a/Utilities/Release/win/x86/test/test-nmake.bat b/Utilities/Release/win/x86/test/test-nmake.bat
new file mode 100755
index 0000000000..5008711ac4
--- /dev/null
+++ b/Utilities/Release/win/x86/test/test-nmake.bat
@@ -0,0 +1,19 @@
+@rem Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+@rem file Copyright.txt or https://cmake.org/licensing for details.
+
+set ARCH=%1
+call \msvc-%ARCH%.bat && @echo on || exit /b
+set "PATH=C:\cmake\cmake\bin;C:\python3;%PATH%"
+mkdir \cmake\src\cmake-nmake && ^
+cd \cmake\src\cmake-nmake && ^
+> CMakeCache.txt (
+ @echo CMAKE_Fortran_COMPILER:STRING=
+ @echo CMAKE_Swift_COMPILER:STRING=
+ @echo CMake_TEST_IPO_WORKS_C:BOOL=ON
+ @echo CMake_TEST_IPO_WORKS_CXX:BOOL=ON
+ @echo CMake_TEST_NO_NETWORK:BOOL=ON
+ @echo CTEST_RUN_MFC:BOOL=OFF
+) && ^
+cmake ..\cmake -DCMake_TEST_HOST_CMAKE=1 -G "NMake Makefiles" && ^
+nmake && ^
+ctest --output-on-failure -j %NUMBER_OF_PROCESSORS%