Skip to content

Commit 71a3f83

Browse files
committed
Initial support for private source
1 parent b2d6285 commit 71a3f83

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

bindings/cpp/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ set_target_properties(${TARGET_NAME} PROPERTIES CXX_EXTENSIONS OFF)
8181
set_target_properties(${TARGET_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} )
8282

8383
if ((SVS_RUNTIME_ENABLE_LVQ OR SVS_RUNTIME_ENABLE_LEANVEC))
84-
if(TARGET svs::svs_static_library)
84+
if(SVS_BUILD_RUNTIME_BINDINGS)
85+
target_link_libraries(${TARGET_NAME} PRIVATE
86+
svs::svs
87+
)
88+
# Using this to decide whether to include lvq_impl.h but can transition to SVS_LVQ_HEADER eventually
89+
target_compile_definitions(${TARGET_NAME} PUBLIC SVS_BUILD_RUNTIME_BINDINGS)
90+
elseif(TARGET svs::svs_static_library)
8591
target_link_libraries(${TARGET_NAME} PRIVATE
8692
svs::svs
8793
svs::svs_static_library

bindings/cpp/src/IndexSVSVamanaLVQImpl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@
2323
#include <svs/extensions/vamana/lvq.h>
2424
#include <svs/extensions/vamana/scalar.h>
2525
#include <svs/orchestrators/dynamic_vamana.h>
26-
//#include <svs/quantization/lvq/impl/lvq_impl.h>
2726
#include <svs/quantization/scalar/scalar.h>
2827

28+
#ifdef SVS_BUILD_RUNTIME_BINDINGS
29+
#include <svs/quantization/lvq/impl/lvq_impl.h>
30+
#endif
31+
2932
namespace svs::runtime {
3033

3134
namespace {

bindings/cpp/src/IndexSVSVamanaLeanVecImpl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
#include <svs/cpuid.h>
2424
#include <svs/extensions/vamana/leanvec.h>
2525
#include <svs/extensions/vamana/scalar.h>
26-
//#include <svs/leanvec/impl/leanvec_impl.h>
2726
#include <svs/orchestrators/dynamic_vamana.h>
2827
#include <svs/quantization/scalar/scalar.h>
2928

29+
#ifdef SVS_BUILD_RUNTIME_BINDINGS
30+
#include <svs/leanvec/impl/leanvec_impl.h>
31+
#endif
32+
3033
namespace svs::runtime {
3134

3235
namespace {

0 commit comments

Comments
 (0)