Skip to content

Commit

Permalink
chore: tidy up c binding build and docs
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Oct 25, 2024
1 parent f6e60f6 commit cf9d32a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bindings/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
# under the License.

cmake_minimum_required(VERSION 3.22)
cmake_policy(SET CMP0135 NEW)

project(opendal-c)

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit cf9d32a

Please sign in to comment.