Debian Codegraph @

debian/tests/cmake-llvm-test

raw
1 #!/bin/sh
2
3 set -e
4
5 LLVM_VERSION=21
6
7 # this is taken from libjsoncpp package
8 # Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us, so we
9 # can avoid duplicating the effort (signal handling, etc.) here.
10 if [ -z "$AUTOPKGTEST_TMP" ]
11 then
12 echo "Required envvar AUTOPKGTEST_TMP \"$AUTOPKGTEST_TMP\" is not set" >&2
13 exit 1
14 fi
15
16
17 # the idea was taken from spirv-llvm-translator package
18
19 cd "$AUTOPKGTEST_TMP"
20 cat <<EOF > CMakeLists.txt
21 cmake_minimum_required(VERSION 3.22)
22 project(cmake-llvm-test)
23 find_package(LLVM $LLVM_VERSION.1 REQUIRED
24 COMPONENTS
25 Analysis
26 BitReader
27 BitWriter
28 Core
29 Support
30 TransformUtils
31 llvm-as
32 llvm-dis
33 )
34
35 EOF
36
37
38 mkdir build && cd build
39 cmake ..