Debian Codegraph @

debian/tests/cmake

raw symbols SCIP
1 #!/bin/sh
2
3 set -eu
4
5 cd "$AUTOPKGTEST_TMP"
6
7 sed 's|#include "tz.h"|#include <date/tz.h>|' "$OLDPWD/test/tz_test/zoned_time.pass.cpp" > main.cpp
8
9 cat <<'EOF' > CMakeLists.txt
10 cmake_minimum_required(VERSION 3.15)
11
12 project(date-autopkgtest-cmake)
13
14 find_package("date" REQUIRED)
15
16 add_executable(main "main.cpp")
17
18 target_compile_features(main PRIVATE cxx_std_17)
19 target_link_libraries(main date::date-tz)
20 EOF
21
22 # Suppress useless warning from GCC saying that some ABI changed
23 # in GCC 7.1 when compiling on arm.
24 if realpath $(command -v c++) | grep -q g++; then
25 export CXXFLAGS='-Wno-psabi'
26 fi
27
28 cmake -B build
29 cmake --build build --verbose
30 ./build/main