Add package tests
This commit is contained in:
parent
f5e7b8b165
commit
2544f2d1a4
|
@ -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)
|
|
@ -0,0 +1,6 @@
|
|||
#define FDB_API_VERSION 610
|
||||
#include <foundationdb/fdb_c.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
return 0;
|
||||
}
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue