Skip to content
Snippets Groups Projects
Commit d3e41b00 authored by root's avatar root
Browse files

Changes to cmake file so that we can find the correct static library.

parent f3308cfd
No related branches found
No related tags found
1 merge request!213Update rmoogli.py
...@@ -218,16 +218,21 @@ if(NOT HDF5_FOUND) ...@@ -218,16 +218,21 @@ if(NOT HDF5_FOUND)
endif(NOT HDF5_FOUND) endif(NOT HDF5_FOUND)
if(HDF5_FOUND) if(HDF5_FOUND)
include_directories( ${HDF5_INCLUDE_DIRS} )
add_definitions( -DUSE_HDF5 ) add_definitions( -DUSE_HDF5 )
# Latest cmake could not find libhdf5_hl.a libraries despite of setting if(HDF5_USE_STATIC_LIBRARIES)
# USE_HDF5_STATIC_LIBRARIES. message(STATUS "Finding static HDF5 libraries in $ENV{HDF5_ROOT}")
if(USE_HDF5_STATIC_LIBRARIES AND $ENV{HDF5_ROOT}) find_library(HDF5_CXX_LIBRARIES NAMES libhdf5.a
find_library(HDF5_CXX_LIBRARIES libhdf5.a PATHS $ENV{HDF5_ROOT}) PATHS $ENV{HDF5_ROOT}/lib $ENV{HDF5_ROOT}/lib64
find_library(HDF5_HL_LIBRARIES libhdf5_hl.a PATHS $ENV{HDF5_ROOT}) )
find_library(HDF5_HL_LIBRARIES NAMES libhdf5_hl.a
PATHS $ENV{HDF5_ROOT}/lib $ENV{HDF5_ROOT}/lib64
)
endif() endif()
include_directories( ${HDF5_INCLUDE_DIRS} ) set(HDF5_LIBRARIES ${HDF5_CXX_LIBRARIES} ${HDF5_HL_LIBRARIES})
foreach(HDF5_LIB ${HDF5_CXX_LIBRARIES} ${HDF5_HL_LIBRARIES} ) message(STATUS "MOOSE will use ${HDF5_LIBRARIES}" )
foreach(HDF5_LIB ${HDF5_LIBRARIES})
if(HDF5_LIB) if(HDF5_LIB)
get_filename_component( HDF5_LIB_EXT ${HDF5_LIB} EXT ) get_filename_component( HDF5_LIB_EXT ${HDF5_LIB} EXT )
if(HDF5_LIB_EXT) if(HDF5_LIB_EXT)
......
3.1.1-55-g1cd7d7e 3.1.1
\ No newline at end of file \ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment