Skip to content

Commit 7fa5857

Browse files
committed
Convert the c-blosc2 submodule into cmake's FetchContent
1 parent cb1dcfc commit 7fa5857

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ else()
3434
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3535
# we want the binaries of the C-Blosc2 library to go into the wheels
3636
set(BLOSC_INSTALL ON)
37-
add_subdirectory(${PROJECT_SOURCE_DIR}/c-blosc2)
38-
include_directories("${PROJECT_SOURCE_DIR}/c-blosc2/include")
37+
include(FetchContent)
38+
FetchContent_Declare(blosc2
39+
GIT_REPOSITORY https://github.com/Blosc/c-blosc2
40+
GIT_TAG b179abf1132dfa5a263b2ebceb6ef7a3c2890c64
41+
)
42+
FetchContent_MakeAvailable(blosc2)
43+
FetchContent_GetProperties(blosc2)
44+
include_directories("${blosc2_SOURCE_DIR}/include")
3945
target_link_libraries(blosc2_ext PRIVATE blosc2_static)
4046
endif()
4147

RELEASING.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Preliminaries
88
to figure it out based on git tags:
99
https://scikit-build-core.readthedocs.io/en/latest/configuration.html#dynamic-metadata
1010

11-
* Make sure that the c-blosc2 submodule is updated to the latest version (or a specific
12-
version that will be documented in the ``RELEASE_NOTES.md``)::
13-
14-
cd c-blosc2
15-
git pull
16-
git checkout <desired tag>
17-
cd ../..
18-
git commit -m "Update C-Blosc2 sources to <desired tag>" c-blosc2
19-
git push
11+
* Make sure that the c-blosc2 repository is updated to the latest version (or a specific
12+
version that will be documented in the ``RELEASE_NOTES.md``). In `CMakeLists.txt` edit::
13+
14+
FetchContent_Declare(blosc2
15+
GIT_REPOSITORY https://github.com/Blosc/c-blosc2
16+
GIT_TAG b179abf1132dfa5a263b2ebceb6ef7a3c2890c64
17+
)
18+
19+
to point to the desired commit/tag in the c-blosc2 repo.
2020

2121
* Make sure that the current main branch is passing the tests in continuous integration.
2222

c-blosc2

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)