File: cmake-test

package info (click to toggle)
faiss 1.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,228 kB
  • sloc: cpp: 91,727; python: 31,865; sh: 874; ansic: 425; makefile: 41
file content (34 lines) | stat: -rwxr-xr-x 810 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -e

cp -r tests cmake "$AUTOPKGTEST_TMP"
mkdir -p "$AUTOPKGTEST_TMP/include/faiss"
cp -r faiss/cppcontrib "$AUTOPKGTEST_TMP/include/faiss"
cd "$AUTOPKGTEST_TMP/tests"

sed -i -e '1i \
cmake_minimum_required(VERSION 3.17)\
project(faiss_autopkgtest)\
find_package(faiss REQUIRED)\
include_directories(../include)\
enable_testing()\
' CMakeLists.txt

GTEST_FILTER="-TestMemoryLeak.*"
if test `dpkg-architecture -qDEB_HOST_ARCH_BITS` = 32
then
	GTEST_FILTER="${GTEST_FILTER}:testCppcontribSaDecode*"
fi
if test `dpkg-architecture -qDEB_HOST_ARCH` != "amd64"
then
	GTEST_FILTER="${GTEST_FILTER}:*flatcodes"
fi
export GTEST_FILTER

set -x
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DFAISS_USE_SYSTEM_GTEST=ON -GNinja -DCMAKE_VERBOSE_MAKEFILE=ON
ninja -v

ctest -V --output-on-failure