Skip to content

Commit

Permalink
Move examples to tests/examples subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
oruebel committed Aug 15, 2024
1 parent ba9fcc4 commit f8577d3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/pages/userdocs/hdf5io.dox
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Coming soon
*
* \snippet tests/testHDF5IO_docs_examples.cpp example_HDF5_with_SWMR_mode
* \snippet tests/examples/test_HDF5IO_examples.cpp example_HDF5_with_SWMR_mode
*
* - Initial size (data is expandable so doesn't matter too much), but if know it then we can set it
* - What chunking to use?
Expand Down
22 changes: 19 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,41 @@ add_executable(aq-nwb_test
testHDF5IO.cpp
testNWBFile.cpp
testNWBRecording.cpp
testHDF5IO_docs_examples.cpp
)
examples/test_HDF5IO_examples.cpp # Include examples source file
)

# Ensure the aq-nwb_test target can include headers from the current directory and Catch2
target_include_directories(aq-nwb_test PRIVATE
${CMAKE_CURRENT_SOURCE_DIR} # Include current directory
${CATCH2_INCLUDE_DIR} # Include Catch2 headers, if found by find_package
)

target_link_libraries(
aq-nwb_test PRIVATE
aq-nwb_lib
Catch2::Catch2WithMain
)

target_compile_features(aq-nwb_test PRIVATE cxx_std_17)

catch_discover_tests(aq-nwb_test)

# ---- Custom Executable ----

add_executable(reader_executable
reader.cpp)
reader.cpp
)

# Ensure the reader_executable target can include headers from the current directory
target_include_directories(reader_executable PRIVATE
${CMAKE_CURRENT_SOURCE_DIR} # Include current directory
)

target_link_libraries(
reader_executable PRIVATE
aq-nwb_lib
)

target_compile_features(reader_executable PRIVATE cxx_std_17)

# ---- End-of-file commands ----
Expand Down
File renamed without changes.

0 comments on commit f8577d3

Please sign in to comment.