Merge configure and configure_msvc to a single configure script that autodetects the environment.

Should help with `build_rostests`, which previously ran the wrong script in an MSVC environment.
This commit is contained in:
Colin Finck 2020-01-08 07:45:00 +01:00
parent 26a5342e91
commit 5dd6295d7d
No known key found for this signature in database
GPG Key ID: 1BA74E70456BA1A9
4 changed files with 24 additions and 27 deletions

View File

@ -249,7 +249,7 @@ Build_MSVC_x86 = util.BuildFactory();
Build_MSVC_x86.addStep(bs_clean)
Build_MSVC_x86.addStep(bs_git)
Build_MSVC_x86.addStep(bs_prepare_source)
Build_MSVC_x86.addStep(steps.Compile(name="configure", command=["bash", scripts_root + "configure_msvc"], description=["configure"], descriptionDone=["configured"]))
Build_MSVC_x86.addStep(steps.Compile(name="configure", command=["bash", scripts_root + "configure"], description=["configure"], descriptionDone=["configured"]))
Build_MSVC_x86.addStep(bs_bootcd)
Build_MSVC_x86.addStep(bs_livecd)
Build_MSVC_x86.addStep(bs_upload_iso)
@ -258,7 +258,7 @@ Build_MSVC_x64 = util.BuildFactory();
Build_MSVC_x64.addStep(bs_clean)
Build_MSVC_x64.addStep(bs_git)
Build_MSVC_x64.addStep(bs_prepare_source)
Build_MSVC_x64.addStep(steps.Compile(name="configure", command=["bash", scripts_root + "configure_msvc"], description=["configure"], descriptionDone=["configured"]))
Build_MSVC_x64.addStep(steps.Compile(name="configure", command=["bash", scripts_root + "configure"], description=["configure"], descriptionDone=["configured"]))
Build_MSVC_x64.addStep(bs_bootcd)
Build_MSVC_x64.addStep(bs_livecd)
Build_MSVC_x64.addStep(steps.Compile(name="rostests", command=["bash", scripts_root + "build_rostests"], warningPattern="^(.*warning[: ].*|.*error[: ].*)", description=["rostests"], descriptionDone=["rostests"]))

View File

@ -18,7 +18,7 @@ Step | Plainbot | Testbot
clean *
Git update *
prepare_source *
configure / configure_msvc *
configure *
build_reactos bootcd *
build_reactos livecd *
regtestcd *

24
worker/configure vendored
View File

@ -5,9 +5,27 @@
# Parameters - Additional configuration options directly passed to CMake.
source ../../config.inc
mkdir -p $CCACHE_DIR
ccache -M $CCACHE_MEMORY
#
# Default configuration in config.inc is RosBE/GCC-related
# MSVC configuration requires overwrites in builder_config.inc like this:
#
#export INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um"
#export LIB="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86"
#export LIBPATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB"
#export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/bin/x86:$ROSBE_DIR/bin:/usr/bin:/cygdrive/c/Windows/System32/wbem:/cygdrive/c/Windows/System32"
#export ROS_OUTPUT="$WORKDIR/output-VS-$ROS_ARCH"
#
mkdir -p $ROS_OUTPUT
cd $ROS_OUTPUT
$TIME cmake -G 'Ninja' -DENABLE_CCACHE:BOOL=1 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ROS_ARCH $@ $SOURCEDIR
if cl 2>&1 >/dev/null; then
# MSVC environment
$TIME cmake -G 'Ninja' -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=$ROS_ARCH -DRUNTIME_CHECKS:BOOL=0 $@ $SOURCEDIR
else
# GCC environment
mkdir -p $CCACHE_DIR
ccache -M $CCACHE_MEMORY
$TIME cmake -G 'Ninja' -DENABLE_CCACHE:BOOL=1 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ROS_ARCH $@ $SOURCEDIR
fi

View File

@ -1,21 +0,0 @@
#!/bin/bash
# ReactOS BuildBot Build Scripts
# configure - Set up the environment for building and let CMake generate build files.
#
# Parameters - Additional configuration options directly passed to CMake.
source ../../config.inc
#
# Default configuration in config.inc is RosBE/GCC-related
# MSVC configuration requires overwrites in builder_config.inc like this:
#
#export INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um"
#export LIB="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86"
#export LIBPATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB"
#export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/bin/x86:$ROSBE_DIR/bin:/usr/bin:/cygdrive/c/Windows/System32/wbem:/cygdrive/c/Windows/System32"
#export ROS_OUTPUT="$WORKDIR/output-VS-$ROS_ARCH"
#
mkdir -p $ROS_OUTPUT
cd $ROS_OUTPUT
$TIME cmake -G 'Ninja' -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=$ROS_ARCH -DRUNTIME_CHECKS:BOOL=0 $@ $SOURCEDIR