diff --git a/.github/workflows/cpp-ci.yml b/.github/workflows/cpp-ci.yml index ab5e863..0362506 100644 --- a/.github/workflows/cpp-ci.yml +++ b/.github/workflows/cpp-ci.yml @@ -52,7 +52,7 @@ jobs: make check-tidy - name : Test - working-directory: ./cpp/build/Release + working-directory: ./cpp/build/test run: ctest . diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 9167769..ef2c798 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -7,6 +7,7 @@ option(WITH_ASAN "Build with address sanitizer." OFF) option(WITH_OPENDAL "Build with opendal." OFF) set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") diff --git a/cpp/Makefile b/cpp/Makefile index 39818f6..3f03fb6 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -6,20 +6,20 @@ ifneq ($(TIDY_THREADS),) endif build: - mkdir -p build && cd build && \ - conan install .. --build=missing && \ - conan build .. + mkdir -p build/release && cd build/release && \ + cmake ../.. && \ + make -j 8 debug: mkdir -p build && cd build && \ - conan install .. --build=missing -s build_type=Debug && \ - conan build .. + cmake -DCMAKE_BUILD_TYPE=Debug .. && \ + make -j 8 clean: rm -rf build test: build - cd build/Release && ctest . -j ${TEST_THREADS} --output-on-failure + cd build/test && ctest . -j ${TEST_THREADS} --output-on-failure fix-format: find ./src -type f ! -name "*.pb.h" -iname *.h -o -iname *.cpp | xargs clang-format -i @@ -32,10 +32,10 @@ check-format: find ./test -type f ! -name "*.pb.h" -iname *.h -o -iname *.cpp | xargs clang-format --dry-run --Werror check-tidy: - python3 ./scripts/run-clang-tidy.py -p build/Release + python3 ./scripts/run-clang-tidy.py -p build fix-tidy: - python3 ./scripts/run-clang-tidy.py -fix -p build/Release + python3 ./scripts/run-clang-tidy.py -fix -p build proto: protoc -I="src/proto" --cpp_out="src/proto" src/proto/*.proto diff --git a/cpp/cmake/libarrow.cmake b/cpp/cmake/libarrow.cmake index 3498d31..4975353 100644 --- a/cpp/cmake/libarrow.cmake +++ b/cpp/cmake/libarrow.cmake @@ -9,7 +9,7 @@ function(build_arrow) ) ExternalProject_Add( arrow_ep - GIT_REPOSITORY git@github.com:apache/arrow.git + GIT_REPOSITORY https://github.com/apache/arrow.git GIT_TAG 740889f CMAKE_ARGS -DARROW_PARQUET=ON diff --git a/cpp/cmake/libglog.cmake b/cpp/cmake/libglog.cmake index 26bdb20..cb0776a 100644 --- a/cpp/cmake/libglog.cmake +++ b/cpp/cmake/libglog.cmake @@ -9,7 +9,7 @@ function(build_glog) ) ExternalProject_Add( glog_ep - GIT_REPOSITORY git@github.com:google/glog.git + GIT_REPOSITORY https://github.com/google/glog.git GIT_TAG v0.6.0 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt index 4092758..b4c8192 100644 --- a/cpp/test/CMakeLists.txt +++ b/cpp/test/CMakeLists.txt @@ -1,10 +1,10 @@ enable_testing() -file(GLOB_RECURSE BUSTUB_TEST_SOURCES "${PROJECT_SOURCE_DIR}/test/*.cpp") +file(GLOB_RECURSE MILVUS_TEST_SOURCES "${PROJECT_SOURCE_DIR}/test/*.cpp") add_executable( milvus_test - ${BUSTUB_TEST_SOURCES} + ${MILVUS_TEST_SOURCES} ) target_link_libraries( diff --git a/cpp/thirdparty/gtest/CMakeLists.txt b/cpp/thirdparty/gtest/CMakeLists.txt index 074abfe..72c16a8 100644 --- a/cpp/thirdparty/gtest/CMakeLists.txt +++ b/cpp/thirdparty/gtest/CMakeLists.txt @@ -3,7 +3,7 @@ include(FetchContent) message(STATUS "Fetching googletest") FetchContent_Declare( googletest - GIT_REPOSITORY git@github.com:google/googletest.git + GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.13.0 ) diff --git a/cpp/thirdparty/protobuf/CMakeLists.txt b/cpp/thirdparty/protobuf/CMakeLists.txt index 334d88d..c795d88 100644 --- a/cpp/thirdparty/protobuf/CMakeLists.txt +++ b/cpp/thirdparty/protobuf/CMakeLists.txt @@ -2,10 +2,10 @@ include(FetchContent) message(STATUS "Fetching protobuf") FetchContent_Declare(protobuf - GIT_REPOSITORY git@github.com:protocolbuffers/protobuf.git + GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git GIT_TAG v3.21.4 ) -set(protobuf_BUILD_TESTS OFF) -set(protobuf_BUILD_PROTOC_BINARIES OFF) +set(protobuf_BUILD_TESTS OFF CACHE INTERNAL "") +set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE INTERNAL "") FetchContent_MakeAvailable(protobuf) \ No newline at end of file