diff --git a/src/cpp/.devcontainer/base-scripts/install-vcpkg.sh b/src/cpp/.devcontainer/base-scripts/install-vcpkg.sh index 81555fa0d..771133459 100644 --- a/src/cpp/.devcontainer/base-scripts/install-vcpkg.sh +++ b/src/cpp/.devcontainer/base-scripts/install-vcpkg.sh @@ -10,10 +10,15 @@ USERNAME=${1:-"vscode"} . /etc/os-release -# Exit early if ARM64 OS does not have cmake version required to build Vcpkg +# The buster pkg repo install cmake version < 3.15 which is required to run bootstrap-vcpkg.sh on ARM64 +VCPKG_UNSUPPORTED_ARM64_VERSION_CODENAMES="buster" + if [ "$(dpkg --print-architecture)" = "arm64" ]; then - echo "OS ${VERSION_CODENAME} ARM64 pkg repo installs cmake version < 3.15, which is required to build Vcpkg." - exit 0 + # Exit early if ARM64 OS does not have cmake version required to build Vcpkg + if [[ "${VCPKG_UNSUPPORTED_ARM64_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then + echo "OS ${VERSION_CODENAME} ARM64 pkg repo installs cmake version < 3.15, which is required to build Vcpkg." + exit 0 + fi fi # Add to bashrc/zshrc files for all users. diff --git a/src/cpp/test-project/test.sh b/src/cpp/test-project/test.sh index d2bf1f2a5..7e7bf7abd 100755 --- a/src/cpp/test-project/test.sh +++ b/src/cpp/test-project/test.sh @@ -7,16 +7,17 @@ source test-utils.sh vscode checkCommon # Help determine distro -. /etc/os-release +. /etc/os-release checkOSPackages "command-line-tools" build-essential cmake cppcheck valgrind clang lldb llvm gdb checkOSPackages "tools-for-vcpkg" tar curl zip unzip pkg-config bash-completion ninja-build -if [ "$(dpkg --print-architecture)" = "amd64" ] ; then +VCPKG_UNSUPPORTED_ARM64_VERSION_CODENAMES="buster" +if [ "$(dpkg --print-architecture)" = "amd64" ] || [[ ! "${VCPKG_UNSUPPORTED_ARM64_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then check "VCPKG_ROOT" [ -d "${VCPKG_ROOT}" ] check "VCPKG_DOWNLOAD" [ -d "${VCPKG_DOWNLOADS}" ] VCPKG_FORCE_SYSTEM_BINARIES=1 check "vcpkg-from-root" ${VCPKG_ROOT}/vcpkg --version VCPKG_FORCE_SYSTEM_BINARIES=1 check "vcpkg-from-bin" vcpkg --version -fi +fi check "g++" g++ -g main.cpp -o main.out rm main.out mkdir -p build