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 15
15
cd pgvector
16
16
make
17
17
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:
67
67
git clone https://github.com/pgvector/pgvector-c.git
68
68
cd pgvector-c
69
69
createdb 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
72
73
```
You can’t perform that action at this time.
0 commit comments