Fix test results for compile scripts

parent a3d31e01
#!/usr/bin/env bash
set -e
export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH:$CMAKE_PREFIX_PATH
# add *_HOME to PATH temporarily
if [ -n "$cmake_HOME" ]
then
export PATH="$cmake_HOME:$PATH"
export PATH="$cmake_HOME:$PATH"
fi
if [ -n "$make_HOME" ]
then
export PATH="$make_HOME:$PATH"
export PATH="$make_HOME:$PATH"
fi
# check if needed programs are in PATH
if [[ `command -v cmake` ]]
then
echo "Found cmake"
echo "Found cmake"
else
echo "Can not find cmake in PATH! Aborting."
echo "Try setting the environment variable cmake_HOME to the base of your installation or adding it to your PATH!"
exit 1
echo "Can not find cmake in PATH! Aborting."
echo "Try setting the environment variable cmake_HOME to the base of your installation or adding it to your PATH!"
exit 1
fi
if [[ `command -v make` ]]
then
echo "Found make"
echo "Found make"
else
echo "Can not find make in PATH! Aborting."
echo "Try setting the environment variable make_HOME to the base of your installation or adding it to your PATH!"
exit 1
echo "Can not find make in PATH! Aborting."
echo "Try setting the environment variable make_HOME to the base of your installation or adding it to your PATH!"
exit 1
fi
# source additional environment variables
......@@ -35,16 +37,15 @@ source "$ROS_HOME"/setup.bash
# Post source check if needed programs are in PATH
if [[ `command -v roscore` ]]
then
echo "Found roscore"
echo "Found roscore"
else
echo "Can not find roscore in PATH! Aborting."
echo "Try setting the environment variable ROS_HOME to the base of your installation or adding it to your PATH!"
exit 1
echo "Can not find roscore in PATH! Aborting."
echo "Try setting the environment variable ROS_HOME to the base of your installation or adding it to your PATH!"
exit 1
fi
# cmake
curDir=`dirname "$0"`
cmake -B"$curDir"/build/ -H"$curDir/src" "$@"
# make
make -j4 -C "$curDir/build"
\ No newline at end of file
# configure cmake
cmake -B"$curDir/build/" -H"$curDir/src/" -DCMAKE_INSTALL_PREFIX="$curDir/install" "$@"
# build
cmake --build "$curDir/build/" --target install --config Release
#!/usr/bin/env bash
set -e
export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH:$CMAKE_PREFIX_PATH
# add *_HOME to PATH temporarily
if [ -n "$cmake_HOME" ]
then
export PATH="$cmake_HOME:$PATH"
export PATH="$cmake_HOME:$PATH"
fi
if [ -n "$make_HOME" ]
then
export PATH="$make_HOME:$PATH"
export PATH="$make_HOME:$PATH"
fi
# check if needed programs are in PATH
if [[ `command -v cmake` ]]
then
echo "Found cmake"
echo "Found cmake"
else
echo "Can not find cmake in PATH! Aborting."
echo "Try setting the environment variable cmake_HOME to the base of your installation or adding it to your PATH!"
exit 1
echo "Can not find cmake in PATH! Aborting."
echo "Try setting the environment variable cmake_HOME to the base of your installation or adding it to your PATH!"
exit 1
fi
if [[ `command -v make` ]]
then
echo "Found make"
echo "Found make"
else
echo "Can not find make in PATH! Aborting."
echo "Try setting the environment variable make_HOME to the base of your installation or adding it to your PATH!"
exit 1
echo "Can not find make in PATH! Aborting."
echo "Try setting the environment variable make_HOME to the base of your installation or adding it to your PATH!"
exit 1
fi
# source additional environment variables
......@@ -35,16 +37,15 @@ source "$ROS2_HOME"/setup.bash
# Post source check if needed programs are in PATH
if [[ `command -v ros2` ]]
then
echo "Found ros2"
echo "Found ros2"
else
echo "Can not find ros2 in PATH! Aborting."
echo "Try setting the environment variable ROS2_HOME to the base of your installation or adding it to your PATH!"
exit 1
echo "Can not find ros2 in PATH! Aborting."
echo "Try setting the environment variable ROS2_HOME to the base of your installation or adding it to your PATH!"
exit 1
fi
# cmake
curDir=`dirname "$0"`
cmake -B"$curDir"/build/ -H"$curDir/src" "$@"
# make
make -j4 -C "$curDir/build"
\ No newline at end of file
# configure cmake
cmake -B"$curDir/build/" -H"$curDir/src/" -DCMAKE_INSTALL_PREFIX="$curDir/install" "$@"
# build
cmake --build "$curDir/build/" --target install --config Release
@ECHO Off
@echo off
:: add *_HOME to PATH temporarily
IF NOT [%cmake_HOME%] == [] (
set PATH="%cmake_HOME%;%PATH%"
......@@ -11,13 +13,13 @@ IF NOT [%msbuild_HOME%] == [] (
where cmake
IF NOT %ERRORLEVEL% EQU 0 (
echo "Can not find cmake in PATH! Aborting."
echo "Try setting the environment variable cmake_HOME to the base of your installation or adding it to your PATH!"
echo "Try setting the environment variable cmake_HOME to the base of your installation or adding it to your PATH!"
exit /B 1
)
where vcvars64.bat
IF NOT %ERRORLEVEL% EQU 0 (
echo "Can not find vcvars64.bat in PATH! Aborting."
echo "Try setting the environment variable msbuild_HOME to the base of your installation or adding it to your PATH!"
echo "Try setting the environment variable msbuild_HOME to the base of your installation or adding it to your PATH!"
exit /B 1
)
......@@ -29,20 +31,18 @@ call %ROS2_HOME%\local_setup.bat
where msbuild
IF NOT %ERRORLEVEL% EQU 0 (
echo "Can not find msbuild in PATH! Aborting."
echo "Try setting the environment variable msbuild_HOME to the base of your installation or adding it to your PATH!"
echo "Try setting the environment variable msbuild_HOME to the base of your installation or adding it to your PATH!"
exit /B 1
)
where ros2
IF NOT %ERRORLEVEL% EQU 0 (
echo "Can not find ros2 in PATH! Aborting."
echo "Try setting the environment variable ROS2_HOME to the base of your installation or adding it to your PATH!"
echo "Try setting the environment variable ROS2_HOME to the base of your installation or adding it to your PATH!"
exit /B 1
)
:: cmake
cmake -B./build/ -G "Visual Studio 15 2017 Win64" %* ./src
:: msbuild
cd .\build
msbuild /m /t:build /p:Configuration=Release ALL_BUILD.vcxproj
cd ..
\ No newline at end of file
SET curDir=%~dp0
:: configure cmake
cmake -B%curDir%/build/ -H%curDir%/src/ -DCMAKE_INSTALL_PREFIX=%curDir%/install -G "Visual Studio 15 2017 Win64" %*
:: build
cmake --build %curDir%/build/ --target install --config Release
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment