From cf9d32aa27f6e23e36d5cafbd9adca94662ca78b Mon Sep 17 00:00:00 2001 From: tison Date: Fri, 25 Oct 2024 11:47:03 +0800 Subject: [PATCH] chore: tidy up c binding build and docs Signed-off-by: tison --- bindings/c/CMakeLists.txt | 5 ++++- bindings/c/README.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt index a6fe41ebd4c..41b510832be 100644 --- a/bindings/c/CMakeLists.txt +++ b/bindings/c/CMakeLists.txt @@ -16,6 +16,8 @@ # under the License. cmake_minimum_required(VERSION 3.22) +cmake_policy(SET CMP0135 NEW) + project(opendal-c) if (NOT CMAKE_BUILD_TYPE) @@ -23,7 +25,6 @@ if (NOT CMAKE_BUILD_TYPE) endif() option(TEST_ENABLE_ASAN "Enable AddressSanitizer for tests" OFF) -set(GOOGLETEST_VERSION 1.15.2) # force the compiler to support these standards set(CMAKE_C_STANDARD 11) @@ -35,6 +36,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # fetch google test via GitHub include(FetchContent) + +set(GOOGLETEST_VERSION 1.15.2) FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/refs/tags/v${GOOGLETEST_VERSION}.zip diff --git a/bindings/c/README.md b/bindings/c/README.md index 19bf72839b3..954405814a4 100644 --- a/bindings/c/README.md +++ b/bindings/c/README.md @@ -89,7 +89,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - To **build the library and header file**. ```sh - mkdir build && cd build + mkdir -p build && cd build cmake .. make ```