Skip to content

Commit

Permalink
CLANG_SUFFIX instead of update-alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
dancazarin committed Jan 25, 2023
1 parent 6702387 commit 347eda1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 2 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ jobs:
- bash: |
set -e
sudo apt-get update && sudo apt-get install -y ninja-build g++-arm-linux-gnueabihf qemu qemu-system-arm qemu-user clang-12
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 100
ci/run.sh build-release -DENABLE_TESTS=ON -DENABLE_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DGCC_VER=9 -DCMAKE_TOOLCHAIN_FILE=../cmake/arm.cmake
ci/run.sh build-release -DENABLE_TESTS=ON -DENABLE_EXAMPLES=OFF -DCLANG_SUFFIX=-12 -DCMAKE_BUILD_TYPE=Release -DGCC_VER=9 -DCMAKE_TOOLCHAIN_FILE=../cmake/arm.cmake
- job: Linux_ARM64_Clang12_Release
timeoutInMinutes: 180
Expand All @@ -161,9 +159,7 @@ jobs:
- bash: |
set -e
sudo apt-get update && sudo apt-get install -y ninja-build g++-aarch64-linux-gnu qemu qemu-system-arm qemu-user clang-12
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 100
ci/run.sh build-release -DENABLE_TESTS=ON -DENABLE_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DGCC_VER=9 -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64.cmake
ci/run.sh build-release -DENABLE_TESTS=ON -DENABLE_EXAMPLES=OFF -DCLANG_SUFFIX=-12 -DCMAKE_BUILD_TYPE=Release -DGCC_VER=9 -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64.cmake
- job: macOSBigSur_x86_64_Clang_Release
timeoutInMinutes: 180
Expand Down
8 changes: 6 additions & 2 deletions cmake/aarch64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ set (AARCH64 True)
set (CMAKE_SYSTEM_PROCESSOR aarch64)
set (EMULATOR qemu-aarch64)

if (NOT CLANG_SUFFIX)
set (CLANG_SUFFIX "")
endif ()

include (CMakeForceCompiler)
CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Clang)
CMAKE_FORCE_C_COMPILER (/usr/bin/clang Clang)
CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++${CLANG_SUFFIX} Clang)
CMAKE_FORCE_C_COMPILER (/usr/bin/clang${CLANG_SUFFIX} Clang)
set (CMAKE_CXX_COMPILER_WORKS TRUE)
set (CMAKE_C_COMPILER_WORKS TRUE)

Expand Down
4 changes: 2 additions & 2 deletions cmake/arm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ set (CMAKE_SYSTEM_PROCESSOR arm)
set (EMULATOR qemu-arm)

include (CMakeForceCompiler)
CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Clang)
CMAKE_FORCE_C_COMPILER (/usr/bin/clang Clang)
CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang${CLANG_SUFFIX}++ Clang)
CMAKE_FORCE_C_COMPILER (/usr/bin/clang${CLANG_SUFFIX} Clang)
set (CMAKE_CXX_COMPILER_WORKS TRUE)
set (CMAKE_C_COMPILER_WORKS TRUE)

Expand Down

0 comments on commit 347eda1

Please sign in to comment.