Skip to content

Commit

Permalink
Remove deprecated conan generator
Browse files Browse the repository at this point in the history
Signed-off-by: Enwei Jiao <[email protected]>
  • Loading branch information
jiaoew1991 committed Nov 7, 2023
1 parent 25bf8a3 commit 6ac6422
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ find_package(nlohmann_json REQUIRED)
find_package(glog REQUIRED)
find_package(prometheus-cpp REQUIRED)
find_package(fmt REQUIRED)
include_directories(${fmt_INCLUDE_DIR})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE)

Expand Down Expand Up @@ -137,6 +136,7 @@ list(APPEND KNOWHERE_LINKER_LIBS faiss)
list(APPEND KNOWHERE_LINKER_LIBS glog::glog)
list(APPEND KNOWHERE_LINKER_LIBS nlohmann_json::nlohmann_json)
list(APPEND KNOWHERE_LINKER_LIBS prometheus-cpp::core prometheus-cpp::push)
list(APPEND KNOWHERE_LINKER_LIBS fmt::fmt-header-only)
list(APPEND KNOWHERE_LINKER_LIBS ${FOLLY_LIBRARIES})

add_library(knowhere SHARED ${KNOWHERE_SRCS})
Expand Down
1 change: 1 addition & 0 deletions cmake/libs/libdiskann.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ target_link_libraries(diskann PUBLIC ${AIO_LIBRARIES}
${DISKANN_BOOST_PROGRAM_OPTIONS_LIB}
nlohmann_json::nlohmann_json
Folly::folly
fmt::fmt-header-only
glog::glog)
if(__X86_64)
target_compile_options(
Expand Down
7 changes: 5 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from conan.tools import files
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.gnu import PkgConfigDeps
from conan.errors import ConanInvalidConfiguration
from conans import tools
import os
Expand All @@ -19,8 +20,6 @@ class KnowhereConan(ConanFile):
homepage = "https://github.com/milvus-io/knowhere"
license = "Apache-2.0"

generators = {"pkg_config","cmake_find_package"}

settings = "os", "arch", "compiler", "build_type"
options = {
"shared": [True, False],
Expand Down Expand Up @@ -157,9 +156,13 @@ def generate(self):
tc.variables["WITH_BENCHMARK"] = self.options.with_benchmark
tc.variables["WITH_COVERAGE"] = self.options.with_coverage
tc.generate()

deps = CMakeDeps(self)
deps.generate()

pc = PkgConfigDeps(self)
pc.generate()

def build(self):
# files.apply_conandata_patches(self)
cmake = CMake(self)
Expand Down

0 comments on commit 6ac6422

Please sign in to comment.