llvm-toolchain/debian/tests/cmake-test
2019-10-05 10:40:09 +02:00

37 lines
626 B
Bash
Executable File

#!/bin/sh
set -e
# this is taken from libjsoncpp package
# Presence of $ADTTMP implies that someone will handle cleanup for us, so we
# can avoid duplicating the effort (signal handling, etc.) here.
if [ -z "$ADTTMP" ]
then
echo "Required envvar ADTTMP \"$ADTTMP\" is not set" >&2
exit 1
fi
# the idea was taken from spirv-llvm-translator package
cd "$ADTTMP"
cat <<EOF > CMakeLists.txt
cmake_minimum_required(VERSION 2.6.2)
find_package(LLVM 9.0.0 REQUIRED
COMPONENTS
Analysis
BitReader
BitWriter
Core
Support
TransformUtils
llvm-as
llvm-dis
)
EOF
mkdir build && cd build
cmake ..