Add package tests

This commit is contained in:
Andrew Noyes 2019-05-23 14:52:09 -07:00
parent f5e7b8b165
commit 2544f2d1a4
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.0)
project(fdb_c_app C)
find_package(FoundationDB-Client REQUIRED)
add_executable(app app.c)
target_link_libraries(app PRIVATE fdb_c)

View File

@ -0,0 +1,6 @@
#define FDB_API_VERSION 610
#include <foundationdb/fdb_c.h>
int main(int argc, char* argv[]) {
return 0;
}

View File

@ -67,6 +67,17 @@ then
popd
python -c 'import fdb; fdb.api_version(610)'
successOr "Loading python bindings failed"
# Test cmake and pkg-config integration: https://github.com/apple/foundationdb/issues/1483
cd /foundationdb/build/cmake/package_tester/fdb_c_app
rm -rf build
mkdir build
cd build
cmake .. && make
successOr "FoundationDB-Client cmake integration failed"
cc ../app.c `pkg-config --libs --cflags foundationdb-client`
successOr "FoundationDB-Client pkg-config integration failed"
}
keep_config() {