1+ required_conan_version = ">=2.0"
2+
13from conan .tools .microsoft import is_msvc , msvc_runtime_flag
2- from conan .tools .build import check_min_cppstd
4+ from conan .tools .build import check_min_cppstd , cppstd_flag
35from conan .tools .scm import Version
46from conan .tools import files
57from conan import ConanFile
68from conan .tools .cmake import CMake , CMakeDeps , CMakeToolchain , cmake_layout
79from conan .tools .gnu import PkgConfigDeps
810from conan .errors import ConanInvalidConfiguration
9- from conans import tools
1011import os
1112
12- required_conan_version = ">=1.55.0"
13-
1413class MilvusCommonConan (ConanFile ):
1514 settings = "os" , "compiler" , "build_type" , "arch"
1615 requires = (
1716 "gtest/1.15.0" ,
18- "glog/0.7.1" ,
19- "fmt/11.0.2" ,
20- "prometheus-cpp/1.2.4" ,
21- "libcurl/8.10.1" ,
22- "gflags/2.2.2" ,
23- "opentelemetry-cpp/1.23.0@milvus/dev#bcd65b63b8db8447178ed93bbc94dcc0" ,
24- "grpc/1.67.1@milvus/dev#5aa62c51bced448b83d7db9e5b3a13c7" ,
25- "abseil/20250127.0" ,
26- "xz_utils/5.4.5" ,
27- "zlib/1.3.1" ,
28- "libevent/2.1.12" ,
29- "openssl/3.3.2" ,
30- "folly/2024.08.12.00@milvus/dev#e09fc71826ce6b4568441910665f0889" ,
31- "boost/1.83.0"
17+ "glog/0.7.1#a306e61d7b8311db8cb148ad62c48030" ,
18+ "fmt/11.0.2#5b29497e03d2cb09d465bd961f15863a" ,
19+ "prometheus-cpp/1.2.4#0c778513df14dc88bb15ed2e5627ee9e" ,
20+ "gflags/2.2.2#7671803f1dc19354cc90bd32874dcfda" ,
21+ "opentelemetry-cpp/1.23.0@milvus/dev#11bc565ec6e82910ae8f7471da756720" ,
22+ "grpc/1.67.1@milvus/dev#e05fe4470d8577922d7cb0a4356dc082" ,
23+ "abseil/20250127.0#481edcc75deb0efb16500f511f0f0a1c" ,
24+ "xz_utils/5.4.5#fc4e36861e0a47ecd4a40a00e6d29ac8" ,
25+ "zlib/1.3.1#8045430172a5f8d56ba001b14561b4ea" ,
26+ "libevent/2.1.12#95065aaefcd58d3956d6dfbfc5631d97" ,
27+ "folly/2024.08.12.00@milvus/dev#d9458305ab94d35c27e5c831304d0081" ,
28+ "boost/1.83.0#4e8a94ac1b88312af95eded83cd81ca8" ,
3229 )
3330
3431 options = {
@@ -37,26 +34,30 @@ class MilvusCommonConan(ConanFile):
3734 }
3835
3936 default_options = {
40- "folly:shared" : True ,
41- "gtest:build_gmock" : True ,
42- "openssl:shared" : True ,
43- "gflags:shared" : True ,
44- "glog:with_gflags" : True ,
45- "glog:shared" : True ,
46- "prometheus-cpp:with_pull" : False ,
47- "fmt:header_only" : False ,
48- "opentelemetry-cpp:with_stl" : True ,
37+ "folly/* :shared" : True ,
38+ "gtest/* :build_gmock" : True ,
39+ "openssl/* :shared" : True ,
40+ "gflags/* :shared" : True ,
41+ "glog/* :with_gflags" : True ,
42+ "glog/* :shared" : True ,
43+ "prometheus-cpp/* :with_pull" : False ,
44+ "fmt/* :header_only" : False ,
45+ "opentelemetry-cpp/* :with_stl" : True ,
4946 "with_ut" : False ,
5047 "with_asan" : False ,
5148 }
5249
5350 def requirements (self ):
5451 # Force all dependencies to use protobuf from milvus/dev channel
5552 # This is needed to resolve conflicts between opentelemetry-cpp and grpc
56- self .requires ("protobuf/5.27.0@milvus/dev#6fff8583e2fe32babef04a9097f1d581" , force = True , override = True )
57- self .requires ("lz4/1.9.4" , force = True , override = True )
53+ self .requires ("protobuf/5.27.0@milvus/dev#42f031a96d21c230a6e05bcac4bdd633" , force = True , override = True )
54+ self .requires ("lz4/1.9.4#1cd3101f8392f5a651cbf390e8a48619" , force = True , override = True )
55+ # Force overrides to resolve opentelemetry-cpp's transitive deps
56+ self .requires ("openssl/3.3.2#90b3fc29e196eb631636c25d3516cd93" , force = True , override = True )
57+ self .requires ("libcurl/8.10.1#8d304dbeaca191a11eb45b5bea1c0e0e" , force = True , override = True )
58+ self .requires ("nlohmann_json/3.11.3#ffb9e9236619f1c883e36662f944345d" , force = True )
5859 if self .settings .os != "Macos" :
59- self .requires ("libunwind/1.8.1" )
60+ self .requires ("libunwind/1.8.1#748a981ace010b80163a08867b732e71 " )
6061
6162 @property
6263 def _minimum_cpp_standard (self ):
@@ -75,7 +76,7 @@ def generate(self):
7576 # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840)
7677 tc .cache_variables ["CMAKE_POLICY_DEFAULT_CMP0077" ] = "NEW"
7778
78- cxx_std_flag = tools . cppstd_flag (self . settings )
79+ cxx_std_flag = cppstd_flag (self )
7980 cxx_std_value = (
8081 cxx_std_flag .split ("=" )[1 ]
8182 if cxx_std_flag
0 commit comments