From 4d2f47c9e4c045269a3fa0648a540bccff0be705 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 14 Apr 2022 17:32:52 -0700 Subject: [PATCH] Revert "Remove configure.bat (#83)" This reverts commit 73acac7ff186eea8f935a69f9c6485a826a9feca. Signed-off-by: Steve Peters --- configure.bat | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 configure.bat diff --git a/configure.bat b/configure.bat new file mode 100644 index 0000000..606abb9 --- /dev/null +++ b/configure.bat @@ -0,0 +1,23 @@ + +:: NOTE: This script is only meant to be used as part of the ignition developers' CI system +:: Users and developers should build and install this library using cmake and Visual Studio + +:: Set configuration variables +@set build_type=Release +@if not "%1"=="" set build_type=%1 +@echo Configuring for build type %build_type% + +:: Use legacy install location if unset +@if "%WORKSPACE_INSTALL_DIR%"=="" set WORKSPACE_INSTALL_DIR="install\%build_type%" + +:: Go to the directory that this configure.bat file exists in +cd /d %~dp0 + +:: Create a build directory and configure +md build +cd build +cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX="%WORKSPACE_INSTALL_DIR%" -DCMAKE_BUILD_TYPE="%build_type%" -DBUILD_TESTING:BOOL=False +:: Note: We disable testing by default. If the intention is for the CI to build and test +:: this project, then the CI script will turn it back on. + +:: If the caller wants to build and/or install, they should do so after calling this script