Skip to content
Snippets Groups Projects
Commit 5d39669d authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Add examples as tests

parent 675cd6db
No related branches found
No related tags found
1 merge request!24Add examples as tests
......@@ -8,7 +8,16 @@ if(ADIOS_USE_MPI)
add_executable(hello_bpWriter helloBPWriter.cpp)
target_include_directories(hello_bpWriter PRIVATE ${MPI_C_INCLUDE_PATH})
target_link_libraries(hello_bpWriter adios2 ${MPI_C_LIBRARIES})
if(ADIOS_BUILD_TESTING)
add_test( NAME Example::hello::bpWriter COMMAND hello_bpWriter)
endif()
else()
add_executable(hello_bpWriter_nompi helloBPWriter_nompi.cpp)
target_link_libraries(hello_bpWriter_nompi adios2)
if(ADIOS_BUILD_TESTING)
add_test( NAME Example::hello::bpWriter_nompi COMMAND hello_bpWriter_nompi)
endif()
endif()
add_executable(hello_bpWriter_nompi helloBPWriter_nompi.cpp)
target_link_libraries(hello_bpWriter_nompi adios2)
......@@ -3,8 +3,26 @@
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
add_executable(hello_datamanReader helloDataManReader.cpp)
target_link_libraries(hello_datamanReader adios2)
if(ADIOS_USE_MPI)
find_package(MPI COMPONENTS C REQUIRED)
add_executable(hello_datamanReader_nompi helloDataManReader_nompi.cpp)
target_link_libraries(hello_datamanReader_nompi adios2)
add_executable(hello_datamanReader helloDataManReader.cpp)
target_link_libraries(hello_datamanReader adios2)
target_include_directories(hello_datamanReader PRIVATE ${MPI_C_INCLUDE_PATH})
target_link_libraries(hello_datamanReader adios2 ${MPI_C_LIBRARIES})
if(ADIOS_BUILD_TESTING)
add_test(NAME Example::hello::datamanReader COMMAND hello_datamanReader)
endif()
else()
add_executable(hello_datamanReader_nompi helloDataManReader_nompi.cpp)
target_link_libraries(hello_datamanReader_nompi adios2)
if(ADIOS_BUILD_TESTING)
add_test(
NAME Example::hello::datamanReader_nompi
COMMAND hello_datamanReader_nompi
)
endif()
endif()
......@@ -3,8 +3,26 @@
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
add_executable(hello_datamanWriter helloDataManWriter.cpp)
target_link_libraries(hello_datamanWriter adios2)
if(ADIOS_USE_MPI)
find_package(MPI COMPONENTS C REQUIRED)
add_executable(hello_datamanWriter helloDataManWriter.cpp)
target_link_libraries(hello_datamanWriter adios2)
target_include_directories(hello_datamanWriter PRIVATE ${MPI_C_INCLUDE_PATH})
target_link_libraries(hello_datamanWriter adios2 ${MPI_C_LIBRARIES})
if(ADIOS_BUILD_TESTING)
add_test(NAME Example::hello::datamanWriter COMMAND hello_datamanWriter)
endif()
else()
add_executable(hello_datamanWriter_nompi helloDataManWriter_nompi.cpp)
target_link_libraries(hello_datamanWriter_nompi adios2)
if(ADIOS_BUILD_TESTING)
add_test(
NAME Example::hello::datamanWriter_nompi
COMMAND hello_datamanWriter_nompi
)
endif()
endif()
add_executable(hello_datamanWriter_nompi helloDataManWriter_nompi.cpp)
target_link_libraries(hello_datamanWriter_nompi adios2)
......@@ -9,8 +9,18 @@ if(ADIOS_USE_MPI)
target_link_libraries(hello_timeBPWriter adios2)
target_include_directories(hello_timeBPWriter PRIVATE ${MPI_C_INCLUDE_PATH})
target_link_libraries(hello_timeBPWriter adios2 ${MPI_C_LIBRARIES})
endif()
if(ADIOS_BUILD_TESTING)
add_test(NAME Example::hello::timeBPWriter COMMAND hello_timeBPWriter)
endif()
else()
add_executable(hello_timeBPWriter_nompi timeBPWriter_nompi.cpp)
target_link_libraries(hello_timeBPWriter_nompi adios2)
add_executable(hello_timeBPWriter_nompi timeBPWriter_nompi.cpp)
target_link_libraries(hello_timeBPWriter_nompi adios2)
if(ADIOS_BUILD_TESTING)
add_test(
NAME Example::hello::timeBPWriter_nompi
COMMAND hello_timeBPWriter_nompi
)
endif()
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment