Skip to content

Commit

Permalink
Add acquire-zarr as a submodule (#308)
Browse files Browse the repository at this point in the history
- Add acquire-zarr submodule
- Make CMake options of informal definitions `NOTEST` and
`WITH_EXAMPLES`
  - Conditionally include directories based on option values
- Move src/driver/* to src/
- Move tests/driver/* to tests/
- Remove all streaming code
  • Loading branch information
aliddell authored Oct 25, 2024
1 parent 1255471 commit b1f1ff3
Show file tree
Hide file tree
Showing 107 changed files with 141 additions and 11,255 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "acquire-common"]
path = acquire-common
url = ../acquire-common.git
[submodule "acquire-zarr"]
path = acquire-zarr
url = ../acquire-zarr.git
19 changes: 15 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,22 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

option(NOTEST "Disable all tests" OFF)
option(BUILD_ACQUIRE_DRIVER_ZARR "Build the Acquire Zarr driver" ON)
option(NO_UNIT_TESTS "Disable unit tests" OFF)
option(WITH_EXAMPLES "Build examples" OFF)

if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)
endif ()

add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(examples)
if (BUILD_TESTING)
add_subdirectory(tests)
else ()
message(STATUS "Skipping test targets")
endif ()

if (WITH_EXAMPLES)
add_subdirectory(examples)
endif ()

include(CPack)
1 change: 1 addition & 0 deletions acquire-zarr
Submodule acquire-zarr added at b20559
43 changes: 39 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
add_subdirectory(logger)
add_subdirectory(streaming)
if (NOT TARGET acquire-core-logger)
set(NOTEST ON)
add_subdirectory(${CMAKE_SOURCE_DIR}/acquire-common/acquire-core-libs ${CMAKE_CURRENT_BINARY_DIR}/acquire-core-libs)
endif ()

if (BUILD_ACQUIRE_DRIVER_ZARR)
add_subdirectory(driver)
if (NOT TARGET acquire-zarr)
set(BUILD_TESTING_TMP ${BUILD_TESTING})
set(BUILD_TESTING OFF)
add_subdirectory(${CMAKE_SOURCE_DIR}/acquire-zarr ${CMAKE_CURRENT_BINARY_DIR}/acquire-zarr)
set(BUILD_TESTING ${BUILD_TESTING_TMP})
endif ()

set(tgt acquire-driver-zarr)
add_library(${tgt} MODULE
zarr.storage.hh
zarr.storage.cpp
zarr.driver.c
)

target_include_directories(${tgt} PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

target_enable_simd(${tgt})
target_link_libraries(${tgt} PRIVATE
acquire-core-logger
acquire-core-platform
acquire-device-kit
acquire-device-properties
acquire-logger
acquire-zarr
blosc_static
nlohmann_json::nlohmann_json
miniocpp::miniocpp
)

set_target_properties(${tgt} PROPERTIES
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
)

install(TARGETS ${tgt} LIBRARY DESTINATION lib)
32 changes: 0 additions & 32 deletions src/driver/CMakeLists.txt

This file was deleted.

19 changes: 0 additions & 19 deletions src/logger/CMakeLists.txt

This file was deleted.

48 changes: 0 additions & 48 deletions src/logger/logger.cpp

This file was deleted.

80 changes: 0 additions & 80 deletions src/logger/logger.hh

This file was deleted.

8 changes: 0 additions & 8 deletions src/logger/logger.types.h

This file was deleted.

65 changes: 0 additions & 65 deletions src/streaming/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit b1f1ff3

Please sign in to comment.