Skip to content

Commit

Permalink
Fix conan deperacted warninig
Browse files Browse the repository at this point in the history
Signed-off-by: Enwei Jiao <[email protected]>
  • Loading branch information
jiaoew1991 committed Nov 14, 2023
1 parent 8037f35 commit b8c8666
Show file tree
Hide file tree
Showing 48 changed files with 131 additions and 148 deletions.
11 changes: 4 additions & 7 deletions internal/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if ( APPLE )
set( CMAKE_CROSSCOMPILING TRUE )
set( RUN_HAVE_GNU_POSIX_REGEX 0 )
endif ()
# set(CMAKE_VERBOSE_MAKEFILE ON)

add_definitions(-DELPP_THREAD_SAFE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down Expand Up @@ -56,7 +57,9 @@ if (CMAKE_COMPILER_IS_GNUCC)
endif ()
endif ()

set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
message(STATUS "CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
include( Utils )

# **************************** Build time, type and code version ****************************
Expand Down Expand Up @@ -91,12 +94,6 @@ set( CMAKE_INSTALL_RPATH "/usr/lib" "${CMAKE_INSTALL_PREFIX}/lib" "${CMAKE_INSTA
set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )

# **************************** Dependencies ****************************
list( APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/conan )
include( ${CMAKE_BINARY_DIR}/conan/conanbuildinfo.cmake )
set( CONAN_DISABLE_CHECK_COMPILER ON )
conan_basic_setup( KEEP_RPATHS )

set( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${CONAN_PROTOBUF_ROOT})

include( CTest )
include( BuildUtils )
Expand Down
11 changes: 9 additions & 2 deletions internal/core/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from conans import ConanFile
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain


class MilvusConan(ConanFile):
Expand Down Expand Up @@ -36,12 +37,11 @@ class MilvusConan(ConanFile):
"xz_utils/5.4.0",
"prometheus-cpp/1.1.0",
"re2/20230301",
"folly/2023.07.12@milvus/dev",
"folly/2023.10.30.01@milvus/dev",
"google-cloud-cpp/2.5.0@milvus/dev",
"opentelemetry-cpp/1.8.1.1@milvus/dev",
"librdkafka/1.9.1",
)
generators = ("cmake", "cmake_find_package")
default_options = {
"librdkafka:shared": True,
"librdkafka:zstd": True,
Expand Down Expand Up @@ -86,6 +86,13 @@ def requirements(self):
# MacOS does not need openblas
self.requires("openblas/0.3.23@milvus/dev")

def generate(self):
tc = CMakeToolchain(self)
tc.generate()

deps = CMakeDeps(self)
deps.generate()

def imports(self):
self.copy("*.dylib", "../lib", "lib")
self.copy("*.dll", "../lib", "lib")
Expand Down
2 changes: 0 additions & 2 deletions internal/core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ include_directories(${MILVUS_ENGINE_SRC})
include_directories(${MILVUS_THIRDPARTY_SRC})

add_subdirectory( pb )
add_subdirectory( log )
add_subdirectory( config )
add_subdirectory( common )
add_subdirectory( storage )
add_subdirectory( index )
Expand Down
25 changes: 19 additions & 6 deletions internal/core/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

milvus_add_pkg_config("milvus_common")

find_package(glog REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(TBB REQUIRED)
find_package(fmt REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(opentelemetry-cpp REQUIRED)

set(COMMON_SRC
Schema.cpp
SystemProperty.cpp
Expand All @@ -22,19 +29,25 @@ set(COMMON_SRC
Tracer.cpp
IndexMeta.cpp
EasyAssert.cpp
ConfigKnowhere.cpp
Log.cpp
)

add_library(milvus_common SHARED ${COMMON_SRC})

target_link_libraries(milvus_common
milvus_config
milvus_log
target_link_libraries(milvus_common PUBLIC
milvus_proto
yaml-cpp
boost_bitset_ext
simdjson
opendal
${CONAN_LIBS}
)
knowhere

glog::glog
yaml-cpp
TBB::tbb
fmt::fmt-header-only
nlohmann_json::nlohmann_json
opentelemetry-cpp::opentelemetry-cpp
)

install(TARGETS milvus_common DESTINATION "${CMAKE_INSTALL_LIBDIR}")
2 changes: 1 addition & 1 deletion internal/core/src/common/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// limitations under the License.

#include "common/Common.h"
#include "log/Log.h"
#include "common/Log.h"

namespace milvus {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "ConfigKnowhere.h"
#include "common/EasyAssert.h"
#include "glog/logging.h"
#include "log/Log.h"
#include "common/Log.h"
#include "knowhere/comp/knowhere_config.h"
#include "knowhere/version.h"

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/core/src/common/IndexMeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "IndexMeta.h"
#include "protobuf_utils.h"
#include "log/Log.h"
#include "common/Log.h"

namespace milvus {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "log/Log.h"
#include "common/Log.h"

/*
* INITIALIZE_EASYLOGGINGPP will create a global variable whose name is same to that already created in knowhere,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/core/src/common/Slice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "common/Slice.h"
#include "common/Common.h"
#include "log/Log.h"
#include "common/Log.h"

namespace milvus {

Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/common/Tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
#include "log/Log.h"
#include "common/Log.h"
#include "Tracer.h"

#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/common/init_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "common/Slice.h"
#include "common/Common.h"
#include "common/Tracer.h"
#include "log/Log.h"
#include "common/Log.h"

std::once_flag flag1, flag2, flag3, flag4, flag5;
std::once_flag traceFlag;
Expand Down
27 changes: 0 additions & 27 deletions internal/core/src/config/CMakeLists.txt

This file was deleted.

8 changes: 7 additions & 1 deletion internal/core/src/index/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License

find_package(marisa REQUIRED)

set(INDEX_FILES
StringIndexMarisa.cpp
Utils.cpp
Expand All @@ -20,6 +22,10 @@ set(INDEX_FILES
milvus_add_pkg_config("milvus_index")
add_library(milvus_index SHARED ${INDEX_FILES})

target_link_libraries(milvus_index milvus_storage)
target_link_libraries(milvus_index
milvus_storage

marisa::marisa
)

install(TARGETS milvus_index DESTINATION "${CMAKE_INSTALL_LIBDIR}")
2 changes: 1 addition & 1 deletion internal/core/src/index/VectorDiskIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "index/VectorDiskIndex.h"

#include "common/Utils.h"
#include "config/ConfigKnowhere.h"
#include "common/ConfigKnowhere.h"
#include "index/Meta.h"
#include "index/Utils.h"
#include "storage/LocalChunkManagerSingleton.h"
Expand Down
4 changes: 2 additions & 2 deletions internal/core/src/index/VectorMemIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
#include "index/Meta.h"
#include "index/Utils.h"
#include "common/EasyAssert.h"
#include "config/ConfigKnowhere.h"
#include "common/ConfigKnowhere.h"
#include "knowhere/factory.h"
#include "knowhere/comp/time_recorder.h"
#include "common/BitsetView.h"
#include "common/Slice.h"
#include "common/Consts.h"
#include "common/RangeSearchHelper.h"
#include "common/Utils.h"
#include "log/Log.h"
#include "common/Log.h"
#include "storage/FieldData.h"
#include "storage/MemFileManagerImpl.h"
#include "storage/ThreadPools.h"
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/indexbuilder/init_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License

#include <string.h>
#include "config/ConfigKnowhere.h"
#include "common/ConfigKnowhere.h"
#include "indexbuilder/init_c.h"

void
Expand Down
21 changes: 0 additions & 21 deletions internal/core/src/log/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion internal/core/src/mmap/Column.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "common/EasyAssert.h"
#include "common/File.h"
#include "fmt/format.h"
#include "log/Log.h"
#include "common/Log.h"
#include "mmap/Utils.h"
#include "storage/FieldData.h"
#include "common/Array.h"
Expand Down
5 changes: 2 additions & 3 deletions internal/core/src/pb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License

find_package(Protobuf REQUIRED)
find_package(protobuf REQUIRED)

add_library(milvus_proto STATIC
common.pb.cc
Expand All @@ -18,6 +18,5 @@ add_library(milvus_proto STATIC
schema.pb.cc
segcore.pb.cc
)
message(STATUS "milvus proto sources: " ${milvus_proto_srcs})

target_link_libraries( milvus_proto PUBLIC ${CONAN_LIBS} )
target_link_libraries(milvus_proto PUBLIC protobuf::libprotobuf)
2 changes: 1 addition & 1 deletion internal/core/src/query/visitors/ExecPlanNodeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "query/generated/ExecExprVisitor.h"
#include "segcore/SegmentGrowing.h"
#include "common/Json.h"
#include "log/Log.h"
#include "common/Log.h"

namespace milvus::query {

Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/segcore/Collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "pb/schema.pb.h"
#include "segcore/Collection.h"
#include "log/Log.h"
#include "common/Log.h"

namespace milvus::segcore {

Expand Down
4 changes: 2 additions & 2 deletions internal/core/src/segcore/IndexConfigGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License

#include "IndexConfigGenerator.h"
#include "log/Log.h"
#include "common/Log.h"

namespace milvus::segcore {
VecIndexConfig::VecIndexConfig(const int64_t max_index_row_cout,
Expand Down Expand Up @@ -72,4 +72,4 @@ VecIndexConfig::GetSearchConf(const SearchInfo& searchInfo) {
return searchParam;
}

} // namespace milvus::segcore
} // namespace milvus::segcore
2 changes: 0 additions & 2 deletions internal/core/src/segcore/Reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

#include "Reduce.h"

#include <log/Log.h>

#include <algorithm>
#include <cstdint>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/segcore/SegmentGrowingImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

#include "common/Consts.h"
#include "common/EasyAssert.h"
#include "common/Log.h"
#include "common/Types.h"
#include "fmt/format.h"
#include "log/Log.h"
#include "nlohmann/json.hpp"
#include "query/PlanNode.h"
#include "query/SearchOnSealed.h"
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/segcore/SegmentSealedImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "common/Consts.h"
#include "common/FieldMeta.h"
#include "common/Types.h"
#include "log/Log.h"
#include "common/Log.h"
#include "query/ScalarIndex.h"
#include "query/SearchBruteForce.h"
#include "query/SearchOnSealed.h"
Expand Down
4 changes: 2 additions & 2 deletions internal/core/src/segcore/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
#include <memory>
#include <string>

#include "common/Common.h"
#include "common/Log.h"
#include "index/ScalarIndex.h"
#include "log/Log.h"
#include "storage/FieldData.h"
#include "storage/RemoteChunkManagerSingleton.h"
#include "common/Common.h"
#include "storage/ThreadPool.h"
#include "storage/Util.h"
#include "mmap/Utils.h"
Expand Down
Loading

0 comments on commit b8c8666

Please sign in to comment.