From 06fd82dad8b2d6fc92b1508fed0a8281e0c0a333 Mon Sep 17 00:00:00 2001 From: Jerome Hue Date: Tue, 26 Dec 2023 05:50:46 +0100 Subject: [PATCH 1/2] Install include-what-you-use --- install.sh | 8 ++++++++ libraries.txt | 1 + linux-x86/Dockerfile | 1 + 3 files changed, 10 insertions(+) diff --git a/install.sh b/install.sh index f3739e3..315b285 100755 --- a/install.sh +++ b/install.sh @@ -101,6 +101,14 @@ if [[ $1 == "cobc" ]]; then cd .. fi +if [[ $1 == "linux" ]]; then + cd include-what-you-use + mkdir build && cd build + cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/usr/lib/llvm-15 ../ + sudo make install + cd ../.. +fi + # Remove cloned repositories to save space in docker image if [ "$DOCKER_BUILD" = true ]; then echo "Removing repositories" diff --git a/libraries.txt b/libraries.txt index 15f1aa8..2204be6 100644 --- a/libraries.txt +++ b/libraries.txt @@ -5,3 +5,4 @@ type_safe,b9138d8a26ea9bbab965f87ee925f53fde025fd9,https://github.com/foonathan/ Catch2,v3.1.0,https://github.com/catchorg/Catch2.git littlefs,cmake,https://github.com/SpaceTeam/littlefs.git NamedType,master,https://github.com/joboccara/NamedType.git +include-what-you-use,clang_15,https://github.com/include-what-you-use/include-what-you-use.git diff --git a/linux-x86/Dockerfile b/linux-x86/Dockerfile index 097dd64..8f9464a 100644 --- a/linux-x86/Dockerfile +++ b/linux-x86/Dockerfile @@ -14,6 +14,7 @@ RUN apt-get update -qq && apt-get install -y -qq \ gcc-12-multilib \ git \ lcov \ + libclang-15-dev \ make \ ninja-build \ pipx \ From c46bb671914efb1ca6da5e7a688831157b34fc0f Mon Sep 17 00:00:00 2001 From: Jerome Hue Date: Tue, 26 Dec 2023 14:33:17 +0100 Subject: [PATCH 2/2] Use Ninja as build system, and build/install using cmake commands --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 315b285..8830551 100755 --- a/install.sh +++ b/install.sh @@ -103,10 +103,10 @@ fi if [[ $1 == "linux" ]]; then cd include-what-you-use - mkdir build && cd build - cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/usr/lib/llvm-15 ../ - sudo make install - cd ../.. + cmake -S . -B build -G "Ninja" -DCMAKE_PREFIX_PATH=/usr/lib/llvm-15 + cmake --build build + sudo cmake --install build + cd .. fi # Remove cloned repositories to save space in docker image