Fix test results for compile scripts

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