Skip to content

Commit e8643c4

Browse files
committed
Use add_subdirectory for examples [skip ci]
1 parent 2995e50 commit e8643c4

File tree

7 files changed

+21
-14
lines changed

7 files changed

+21
-14
lines changed

examples/cohere/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git GI
1515
FetchContent_Declare(libpqxx GIT_REPOSITORY https://github.com/jtv/libpqxx.git GIT_TAG 7.10.0)
1616
FetchContent_MakeAvailable(cpr json libpqxx)
1717

18+
add_subdirectory("${PROJECT_SOURCE_DIR}/../.." pgvector)
19+
1820
add_executable(example example.cpp)
19-
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/../../include)
20-
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json)
21+
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json pgvector::pgvector)

examples/disco/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ FetchContent_Declare(disco GIT_REPOSITORY https://github.com/ankane/disco-cpp.gi
1414
FetchContent_Declare(libpqxx GIT_REPOSITORY https://github.com/jtv/libpqxx.git GIT_TAG 7.10.0)
1515
FetchContent_MakeAvailable(disco libpqxx)
1616

17+
add_subdirectory("${PROJECT_SOURCE_DIR}/../.." pgvector)
18+
1719
add_executable(example example.cpp)
18-
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/../../include)
19-
target_link_libraries(example PRIVATE disco::disco libpqxx::pqxx)
20+
target_link_libraries(example PRIVATE disco::disco libpqxx::pqxx pgvector::pgvector)

examples/hybrid/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git GI
1515
FetchContent_Declare(libpqxx GIT_REPOSITORY https://github.com/jtv/libpqxx.git GIT_TAG 7.10.0)
1616
FetchContent_MakeAvailable(cpr json libpqxx)
1717

18+
add_subdirectory("${PROJECT_SOURCE_DIR}/../.." pgvector)
19+
1820
add_executable(example example.cpp)
19-
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/../../include)
20-
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json)
21+
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json pgvector::pgvector)

examples/loading/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ include(FetchContent)
1313
FetchContent_Declare(libpqxx GIT_REPOSITORY https://github.com/jtv/libpqxx.git GIT_TAG 7.10.0)
1414
FetchContent_MakeAvailable(libpqxx)
1515

16+
add_subdirectory("${PROJECT_SOURCE_DIR}/../.." pgvector)
17+
1618
add_executable(example example.cpp)
17-
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/../../include)
18-
target_link_libraries(example PRIVATE libpqxx::pqxx)
19+
target_link_libraries(example PRIVATE libpqxx::pqxx pgvector::pgvector)

examples/openai/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git GI
1515
FetchContent_Declare(libpqxx GIT_REPOSITORY https://github.com/jtv/libpqxx.git GIT_TAG 7.10.0)
1616
FetchContent_MakeAvailable(cpr json libpqxx)
1717

18+
add_subdirectory("${PROJECT_SOURCE_DIR}/../.." pgvector)
19+
1820
add_executable(example example.cpp)
19-
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/../../include)
20-
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json)
21+
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json pgvector::pgvector)

examples/rdkit/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ include(FetchContent)
1616
FetchContent_Declare(libpqxx GIT_REPOSITORY https://github.com/jtv/libpqxx.git GIT_TAG 7.10.0)
1717
FetchContent_MakeAvailable(libpqxx)
1818

19+
add_subdirectory("${PROJECT_SOURCE_DIR}/../.." pgvector)
20+
1921
add_executable(example example.cpp)
20-
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/../../include)
21-
target_link_libraries(example PRIVATE libpqxx::pqxx RDKit::Fingerprints RDKit::SmilesParse)
22+
target_link_libraries(example PRIVATE libpqxx::pqxx pgvector::pgvector RDKit::Fingerprints RDKit::SmilesParse)

examples/sparse/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git GI
1515
FetchContent_Declare(libpqxx GIT_REPOSITORY https://github.com/jtv/libpqxx.git GIT_TAG 7.10.0)
1616
FetchContent_MakeAvailable(cpr json libpqxx)
1717

18+
add_subdirectory("${PROJECT_SOURCE_DIR}/../.." pgvector)
19+
1820
add_executable(example example.cpp)
19-
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/../../include)
20-
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json)
21+
target_link_libraries(example PRIVATE cpr::cpr libpqxx::pqxx nlohmann_json::nlohmann_json pgvector::pgvector)

0 commit comments

Comments
 (0)