Skip to content

Commit

Permalink
fmk - fixing Unix Dependency file for latest, CMake for HDF5
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Nov 17, 2021
1 parent d1b3625 commit 22b5094
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 12 deletions.
18 changes: 18 additions & 0 deletions BuildTools/cmake/OpenSeesDependenciesUnix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,27 @@
#==============================================================================




find_package(TCL REQUIRED)
find_package(MySQL REQUIRED)

#
#sudo apt-get install libhdf5-serial-dev
# - installed version 1.10
# - we need version 1.12
# - hdf5-1.12.1-linux-centos7-x86_64-gcc485-static.tar.gz

set (HDF5_USE_STATIC_LIBRARIES ON)
find_package(HDF5)
if (HDF5_FOUND)
message(STATUS "HDF5 found version: ${HDF5_VERSION}")
message(STATUS "HDF5_CXX_DEFINITIONS = ${HDF5_CXX_DEFINITIONS}")
message(STATUS "HDF5_LIBRARIES = ${HDF5_LIBRARIES}" )
if (HDF_VERSION VERSION_LESS 1.12)
message(STATUS "HDF5 VERSION OLD: ${HDF5_VERSION}" )
endif()
endif()



Expand Down
21 changes: 11 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ endif()


target_link_libraries(OpenSees
OPS_InterpTcl OPS_Thermal OpenSeesLIB ${CMAKE_DL_LIBS} ${CONAN_LIBS}
OPS_InterpTcl OPS_Thermal OpenSeesLIB ${CMAKE_DL_LIBS} ${HDF5_LIBRARIES} ${CONAN_LIBS}
)


Expand Down Expand Up @@ -581,15 +581,16 @@ endif()
#----------------------------
# HDF5
#----------------------------
if(OPS_Use_HDF5)
find_package(HDF5)
if(HDF5_FOUND)
include_directories(${HDF5_INCLUDE_DIR})
set(_hdf5_libs hdf5 hdf5_cpp)
add_compile_definitions(-D_H5DRM)
else()
message(STATUS "OPS >>> Could not find HDF5")
endif()

if(HDF5_FOUND)
include_directories(${HDF5_INCLUDE_DIR})
set(_hdf5_libs hdf5 hdf5_cpp)
add_compile_definitions(_H5DRM)
if (HDF5_VERSION VERSION_GREATER_EQUAL 1.12.0)
add_compile_definitions(_HDF5)
endif()
else()
message(STATUS "OPS >>> Could not find HDF5")
endif()


Expand Down
5 changes: 3 additions & 2 deletions SRC/domain/pattern/drm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ target_sources(OPS_Domain
DRMInputHandler.h
PlaneDRMInputHandler.h
)
if (OPS_Use_HDF5)
target_sources(OPS_DRM

if (HDF5_FOUND)
target_sources(OPS_Domain
PRIVATE
H5DRM.cpp
PUBLIC
Expand Down

0 comments on commit 22b5094

Please sign in to comment.