diff --git a/Unreal/Environments/Blocks/clean.sh b/Unreal/Environments/Blocks/clean.sh old mode 100644 new mode 100755 diff --git a/Unreal/Environments/Blocks/update_from_git.sh b/Unreal/Environments/Blocks/update_from_git.sh old mode 100644 new mode 100755 index 1460568547..2f57806129 --- a/Unreal/Environments/Blocks/update_from_git.sh +++ b/Unreal/Environments/Blocks/update_from_git.sh @@ -1,6 +1,13 @@ -scr_dir=`realpath $0` -rsync -a --delete ../../Plugins/AirSim Plugins/AirSim -robocopy /MIR ..\..\Plugins\AirSim Plugins\AirSim /XD temp *. /njh /njs /ndl /np -robocopy /MIR ..\..\..\AirLib Plugins\AirSim\Source\AirLib /XD temp *. /njh /njs /ndl /np +#! /bin/bash -pause \ No newline at end of file +# get path of current script: https://stackoverflow.com/a/39340259/207661 +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +pushd "$SCRIPT_DIR" + +set -e +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 diff --git a/clean.sh b/clean.sh old mode 100644 new mode 100755 diff --git a/cmake/cmake-modules/CommonSetup.cmake b/cmake/cmake-modules/CommonSetup.cmake index 2592e312ea..fe424d9060 100644 --- a/cmake/cmake-modules/CommonSetup.cmake +++ b/cmake/cmake-modules/CommonSetup.cmake @@ -23,6 +23,7 @@ macro(CommonSetup) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__CLANG__") else () ##TODO: Werror removed temporarily. It should be added back after Linux build is stable + # other flags used in Unreal: -funwind-tables -fdiagnostics-format=msvc -fno-inline -fno-omit-frame-pointer -fstack-protector -O2 set(CMAKE_CXX_FLAGS "-std=c++14 -ggdb -Wall -Wextra -Wstrict-aliasing -Wunreachable-code -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wno-variadic-macros -Wno-parentheses -fdiagnostics-show-option ${MAVLINK_OVERRIDES} ${AIRLIB_OVERRIDES} ${RPC_LIB_DEFINES} ${CMAKE_CXX_FLAGS}") if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") diff --git a/cmake/getlibcxx.sh b/cmake/getlibcxx.sh index a2690fd8e2..26bb1317dc 100755 --- a/cmake/getlibcxx.sh +++ b/cmake/getlibcxx.sh @@ -1,25 +1,33 @@ -#! /bin/bash +#! /bin/bash + +set +x +set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "$SCRIPT_DIR" +pushd "$SCRIPT_DIR" # add llvm-source to root of AirSim cd .. # Checkout LLVM sources -git clone --depth=1 https://github.com/llvm-mirror/llvm.git llvm-source -git clone --depth=1 https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx -git clone --depth=1 https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi +# git clone --depth=1 -b release_39 https://github.com/llvm-mirror/llvm.git llvm-source +# git clone --depth=1 -b release_39 https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx +# git clone --depth=1 -b release_39 https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi + +# Build and install libc++ +rm -rf llvm-build +mkdir llvm-build && cd llvm-build export C_COMPILER=clang export COMPILER=clang++ # Build and install libc++ -mkdir llvm-build && cd llvm-build cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} \ + -DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr \ - ../llvm-source -make cxx -sudo make install-cxxabi install-cxx + ../llvm-source + make cxx + +sudo make install-libcxx install-libcxxabi popd \ No newline at end of file diff --git a/cmake/getlibcxx_clean.sh b/cmake/getlibcxx_clean.sh new file mode 100755 index 0000000000..436c709392 --- /dev/null +++ b/cmake/getlibcxx_clean.sh @@ -0,0 +1,12 @@ +#! /bin/bash + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +pushd "$SCRIPT_DIR" + +# add llvm-source to root of AirSim +cd .. + +rm -rf llvm-source +rm -rf llvm-build + +popd \ No newline at end of file