File tree Expand file tree Collapse file tree 4 files changed +22
-5
lines changed
Expand file tree Collapse file tree 4 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 1515 cd pgvector
1616 make
1717 sudo make install
18- - run : gcc -Wall -Wextra -Werror -I/usr/include/postgresql -o test/pq test/pq_test.c -lpq
19- - run : test/pq
18+ - run : cmake -S . -B build
19+ - run : cmake --build build
20+ - run : build/test
Original file line number Diff line number Diff line change 1- / test / pq
1+ build
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.18)
2+
3+ project (pgvector LANGUAGES C)
4+
5+ option (BUILD_TESTING "" ON )
6+
7+ if (BUILD_TESTING)
8+ find_package (PostgreSQL REQUIRED)
9+
10+ add_executable (test test /pq_test.c)
11+ target_link_libraries (test PRIVATE PostgreSQL::PostgreSQL)
12+ if (NOT MSVC )
13+ target_compile_options (test PRIVATE -Wall -Wextra -Wpedantic -Werror)
14+ endif ()
15+ endif ()
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ To get started with development:
6767git clone https://github.com/pgvector/pgvector-c.git
6868cd pgvector-c
6969createdb pgvector_c_test
70- gcc -Wall -Wextra -Werror -o test/pq test/pq_test.c -lpq
71- test/pq
70+ cmake -S . -B build
71+ cmake --build build
72+ build/test
7273```
You can’t perform that action at this time.
0 commit comments