diff --git a/Unreal/Environments/Blocks/clean.sh b/Unreal/Environments/Blocks/clean.sh index efaf866687..18c2d9a0b2 100755 --- a/Unreal/Environments/Blocks/clean.sh +++ b/Unreal/Environments/Blocks/clean.sh @@ -2,9 +2,10 @@ # get path of current script: https://stackoverflow.com/a/39340259/207661 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -pushd "$SCRIPT_DIR" +pushd "$SCRIPT_DIR" >/dev/null set -e +set -x # clean temporary unreal folders rm -rf Binaries @@ -14,4 +15,4 @@ rm -rf Plugins/AirSim/Binaries rm -rf Plugins/AirSim/Intermediate rm -rf Plugins/AirSim/Saved -popd \ No newline at end of file +popd >/dev/null \ No newline at end of file diff --git a/Unreal/Environments/Blocks/update_from_git.sh b/Unreal/Environments/Blocks/update_from_git.sh index 2f57806129..ff3a993c59 100755 --- a/Unreal/Environments/Blocks/update_from_git.sh +++ b/Unreal/Environments/Blocks/update_from_git.sh @@ -2,12 +2,12 @@ # get path of current script: https://stackoverflow.com/a/39340259/207661 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -pushd "$SCRIPT_DIR" +pushd "$SCRIPT_DIR" >/dev/null set -e -set +x +set -x rsync -a --exclude 'temp' --delete ../../Plugins/AirSim Plugins/AirSim rsync -a --exclude 'temp' --delete ../../../AirLib Plugins/AirSim/Source/AirLib -popd \ No newline at end of file +popd >/dev/null \ No newline at end of file diff --git a/build.sh b/build.sh index 25e551b55c..52546fc3e2 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ # get path of current script: https://stackoverflow.com/a/39340259/207661 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -pushd "$SCRIPT_DIR" +pushd "$SCRIPT_DIR" >/dev/null set -e set -x @@ -46,19 +46,19 @@ fi if [[ ! -d $build_dir ]]; then mkdir -p $build_dir - pushd $build_dir + pushd $build_dir >/dev/null cmake ../cmake -DCMAKE_BUILD_TYPE=Debug \ - || (cd .. && rm -r $build_dir && exit 1) - popd &>/dev/null + || (popd && rm -r $build_dir && exit 1) + popd >/dev/null fi -pushd $build_dir +pushd $build_dir >/dev/null # final linking of the binaries can fail due to a missing libc++abi library # (happens on Fedora, see https://bugzilla.redhat.com/show_bug.cgi?id=1332306). # So we only build the libraries here for now make -popd &>/dev/null +popd >/dev/null mkdir -p AirLib/lib/x64/Debug @@ -94,4 +94,4 @@ echo "https://github.com/Microsoft/AirSim/blob/master/docs/linux_build.md" echo "==================================================================" -popd +popd >/dev/null diff --git a/clean.sh b/clean.sh index 892d9a3dd6..136d670e68 100755 --- a/clean.sh +++ b/clean.sh @@ -2,7 +2,7 @@ # get path of current script: https://stackoverflow.com/a/39340259/207661 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -pushd "$SCRIPT_DIR" +pushd "$SCRIPT_DIR" >/dev/null set -e set +x @@ -11,4 +11,4 @@ rm -rf build_debug rm -rf build_release rm -rf cmake/output -popd \ No newline at end of file +popd >/dev/null \ No newline at end of file diff --git a/cmake/cmake-modules/CommonSetup.cmake b/cmake/cmake-modules/CommonSetup.cmake index 35fdd3f2da..5e86a19879 100644 --- a/cmake/cmake-modules/CommonSetup.cmake +++ b/cmake/cmake-modules/CommonSetup.cmake @@ -71,12 +71,12 @@ macro(CommonSetup) if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") # make sure to match the compiler flags with which the Unreal # Engine is built with - set(CMAKE_EXE_LINKER_FLAGS "\ - ${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi -lm -lc -lgcc_s -lgcc -ldl \ - -Wl,-rpath,${LIBCXX_LIB_PATH}") set(CMAKE_CXX_FLAGS "\ -nostdinc++ -isystem ${LIBCXX_INC_PATH} \ -D__CLANG__ ${CMAKE_CXX_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS "\ + ${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi -lm -lc -lgcc_s -lgcc -ldl \ + -L ${LIBCXX_LIB_PATH}") set(CXX_EXP_LIB "-lc++experimental") if("${BUILD_TYPE}" STREQUAL "debug") diff --git a/setup.sh b/setup.sh index 671963e0ec..3e8bc37d0e 100755 --- a/setup.sh +++ b/setup.sh @@ -4,7 +4,7 @@ set -x set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -pushd "$SCRIPT_DIR" +pushd "$SCRIPT_DIR" >/dev/null #get sub modules git submodule update --init --recursive @@ -28,7 +28,8 @@ fi #build libc++ sudo rm -rf llvm-build -mkdir llvm-build && cd llvm-build +mkdir -p llvm-build +pushd llvm-build >/dev/null export C_COMPILER=clang-3.9 export COMPILER=clang++-3.9 @@ -43,6 +44,8 @@ make cxx #install libc++ locally in output folder sudo make install-libcxx install-libcxxabi +popd >/dev/null + #install EIGEN library if [[ -z "${EIGEN_ROOT}" ]] || [[ ! -d eigen ]]; then echo "EIGEN_ROOT variable is not set" @@ -50,15 +53,15 @@ if [[ -z "${EIGEN_ROOT}" ]] || [[ ! -d eigen ]]; then echo "downloading eigen..." wget http://bitbucket.org/eigen/eigen/get/3.3.2.zip unzip 3.3.2.zip -d eigen - pushd eigen + pushd eigen >/dev/null mv eigen* eigen3 echo "3.3.2" > version - popd &>/dev/null + popd >/dev/null rm 3.3.2.zip fi fi -popd +popd >/dev/null set +x echo ""