mirror of https://github.com/Kitware/CMake.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
733 B
25 lines
733 B
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Install development tools.
|
|
dnf install -y $(grep '^[^#]\+$' /root/iwyu_packages.lst)
|
|
|
|
cd /root
|
|
git clone "https://github.com/include-what-you-use/include-what-you-use.git"
|
|
cd include-what-you-use
|
|
readonly llvm_full_version="$( clang --version | head -n1 | cut -d' ' -f3 )"
|
|
readonly llvm_version="$( echo "$llvm_full_version" | cut -d. -f-1 )"
|
|
git checkout "clang_$llvm_version"
|
|
mkdir build
|
|
cd build
|
|
|
|
cmake -GNinja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
"-DIWYU_RESOURCE_RELATIVE_TO=clang" \
|
|
"-DIWYU_RESOURCE_DIR=../lib/clang/$llvm_version" \
|
|
"-DCMAKE_INSTALL_PREFIX=/usr/local/lib/llvm-$llvm_version" \
|
|
..
|
|
ninja
|
|
DESTDIR=/root/iwyu-destdir ninja install
|
|
tar -C /root/iwyu-destdir -cf /root/iwyu.tar .
|