File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ project(milvus_sdk LANGUAGES CXX)
2020set (CMAKE_POLICY_VERSION_MINIMUM 3.5)
2121set (CMAKE_VERBOSE_MAKEFILE OFF )
2222set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
23- set (CMAKE_CXX_STANDARD 14)
23+ set (CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard used to build Milvus C++ SDK" )
2424set (CMAKE_CXX_STANDARD_REQUIRED ON )
2525
2626set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
Original file line number Diff line number Diff line change @@ -65,12 +65,6 @@ def validate(self):
6565 # The project currently builds with C++14.
6666 check_min_cppstd (self , 14 )
6767
68- def configure (self ):
69- # Ensure dependency graph variants match the project's C++ standard.
70- # (Without this, Conan may resolve packages for gnu17 and then fail to
71- # find compatible binaries.)
72- self .settings .compiler .cppstd = "14"
73-
7468 def generate (self ):
7569 tc = CMakeToolchain (self )
7670
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ DO_INSTALL="OFF"
3030CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-/ usr/ local}
3131BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:- ON}
3232BUILD_FROM_CONAN=" ON"
33-
33+ CPPSTD= ${CPPSTD :- 14}
3434
3535JOBS=" ${JOBS:- $(nproc 2>/ dev/ null || sysctl -n hw.logicalcpu 2>/ dev/ null || echo 3)} "
3636if [ ${JOBS} -lt 3 ] ; then
@@ -133,7 +133,6 @@ if [[ "${BUILD_FROM_CONAN}" == "ON" ]]; then
133133 # Dependencies must come from Conan; external gRPC is not supported.
134134 # Users can override the Conan executable via CONAN.
135135 CONAN=${CONAN:- conan}
136- CPPSTD=${CPPSTD:- 14}
137136 CONAN_LIBCXX_SETTINGS=()
138137 if [[ -n " ${CONAN_LIBCXX:- } " ]]; then
139138 CONAN_LIBCXX_SETTINGS+=(" -s" " compiler.libcxx=${CONAN_LIBCXX} " )
229228CMAKE_CMD=" cmake \
230229-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
231230-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
231+ -DCMAKE_CXX_STANDARD=${CPPSTD} \
232232-DMILVUS_BUILD_TEST=${BUILD_TEST} \
233233-DMILVUS_BUILD_COVERAGE=${BUILD_COVERAGE} \
234234-DMILVUS_BUILD_EXAMPLES=${CMAKE_BUILD_EXAMPLES} \
You can’t perform that action at this time.
0 commit comments