diff --git a/Dockerfile b/Dockerfile index 02795d3..87899af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,7 @@ RUN apt-get update FROM base AS x64-version # add build tools including Google test and mock -COPY scripts/install_build_tools.sh /install_build_tools.sh -RUN ./install_build_tools.sh +RUN ./opt/carma/scripts/install_build_tools.sh FROM base AS cross-compile-version diff --git a/scripts/build_script.sh b/scripts/build_script.sh index 760dbc8..f8d14b7 100755 --- a/scripts/build_script.sh +++ b/scripts/build_script.sh @@ -58,7 +58,7 @@ if [ $GENERATE_COVERAGE -eq 1 ]; then COVERAGE_FLAGS=-DGENERATE_COVERAGE=True fi -cmake -B${BUILD_DIR} ${TOOLCHAIN_ARG} -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${PACKAGE_VERSION_SUFFIX} ${COVERAGE_FLAGS} . +cmake -B${BUILD_DIR} ${TOOLCHAIN_ARG} -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${PACKAGE_VERSION_SUFFIX} ${COVERAGE_FLAGS} cd ${BUILD_DIR} cmake --build . if [ $GENERATE_DEBIAN_PACKAGE -eq 1 ]; then diff --git a/scripts/install_build_tools.sh b/scripts/install_build_tools.sh index f225bab..bfbe41d 100755 --- a/scripts/install_build_tools.sh +++ b/scripts/install_build_tools.sh @@ -16,12 +16,9 @@ echo "Installing CMake ${CMAKE_VERSION}" wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz chmod u+x cmake-${CMAKE_VERSION}-linux-x86_64.sh -./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --include-subdir --prefix=/opt +./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local rm cmake-${CMAKE_VERSION}-linux-x86_64.sh rm cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -echo "export PATH=/opt/cmake-${CMAKE_VERSION}-linux-x86_64/bin:$PATH" >> /etc/bash.bashrc -# shellcheck source=/dev/null -export PATH=/opt/cmake-${CMAKE_VERSION}-linux-x86_64/bin:$PATH echo "CMake installation complete" # Installing Google Test GTEST_VERSION="1.14.0"