Skip to content

Commit

Permalink
Merge pull request #64 from LLNL/feature/sidre-data-collection
Browse files Browse the repository at this point in the history
Feature/sidre data collection
  • Loading branch information
MishaZakharchanka authored Sep 8, 2021
2 parents 53ae05f + 94d807a commit c53e13d
Show file tree
Hide file tree
Showing 15 changed files with 1,192 additions and 15 deletions.
4 changes: 3 additions & 1 deletion cmake/tpl/axom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ set(AXOM_DIST "Axom-v0.3.3.tar.gz")
set(AXOM_URL "https://github.com/LLNL/axom/releases/download/v0.3.3/${AXOM_DIST}")
set(AXOM_CACHE "${CACHE_DIR}/${AXOM_DIST}")

set(${lib_name}_libs )
set(${lib_name}_libs
libaxom.a
)

if(${lib_name}_BUILD)

Expand Down
8 changes: 7 additions & 1 deletion cmake/tpl/conduit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ set(CONDUIT_DIST "conduit-v0.5.1-src-with-blt.tar.gz")
set(CONDUIT_URL "https://github.com/LLNL/conduit/releases/download/v0.5.1/${CONDUIT_DIST}")
set(CONDUIT_CACHE "${CACHE_DIR}/${CONDUIT_DIST}")

set(${lib_name}_libs )
list(APPEND ${lib_name}_INCLUDES $<BUILD_INTERFACE:${${lib_name}_DIR}/include/${lib_name}>)

set(${lib_name}_libs
libconduit.so
libconduit_blueprint.so
libconduit_relay.so
)

if(${lib_name}_BUILD)

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ foreach(e_package ${extra_packages})
add_subdirectory(${extra_packages_DIR}/${e_package} ${CMAKE_CURRENT_BINARY_DIR}/${e_package})
endforeach()

#add_subdirectory(CXXTests)
add_subdirectory(CXXTests)

install(EXPORT ${PROJECT_NAME}-targets DESTINATION Spheral/lib/cmake)
14 changes: 7 additions & 7 deletions src/CXXTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
#------------------------------------------------------------------------------

set(gtest_spheral_tests
basic.cc
testSidreStorage.cc
)


# set(spheral_test_depends
# spheral_blt_depends
# )

#------------------------------------------------------------------------------
# Add gtest C++ tests
#------------------------------------------------------------------------------

get_property(SPHERAL_CXX_LIBS GLOBAL PROPERTY SPHERAL_CXX_LIBS)

foreach(test ${gtest_spheral_tests})
get_filename_component( test_name ${test} NAME_WE )

blt_add_executable( NAME ${test_name}_test
SOURCES ${test}
OUTPUT_DIR ${${PROJECT_BINARY_DIR}/tests}
DEPENDS_ON ${SPHERAL_CXX_LIBS} ${spheral_blt_depends} gtest
OUTPUT_DIR ${PROJECT_BINARY_DIR}/tests
DEPENDS_ON gtest ${SPHERAL_CXX_LIBS} ${spheral_blt_depends}
)

blt_add_test( NAME ${test_name}
Expand Down
16 changes: 16 additions & 0 deletions src/CXXTests/testSidreStorage.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "testSidreStorage.hh"

TYPED_TEST(SidreDataCollectionTestNew, SidreAllocViewTest)
{
Spheral::SidreDataCollection myData;
size_t n = 10;

SpheralTestNodeList<TypeParam> makeNodeList("test bed", n, 0);
SpheralTestField<TypeParam> testField("test field", makeNodeList);

initField<TypeParam>(testField, n);

axom::sidre::Group *myTemp = myData.sidreStoreField("SidreTest", testField);

testSidreData<TypeParam>(testField, myTemp);
}
Loading

0 comments on commit c53e13d

Please sign in to comment.