Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,25 @@ if(WITH_BOOST OR WITH_BOOST_ODE)
set(WITH_GSL OFF)
endif()

find_package(HDF5 COMPONENTS CXX HL)

if (NOT HDF5_FOUND)
message("==================================================================\n"
" HDF5 not found. Disabling NSDF support.\n\n"
" If you need NSDF support, please install hdf5-dev or hdf5-devel\n"
" package or equivalent.\n\n"
" $ sudo apt-get install libhdf5-dev \n"
" $ sudo yum install libhdf5-devel \n"
" $ brew install hdf5 \n\n"
" Otherwise, continue with 'make' and 'make install' \n"
" If you install hdf5 to non-standard path, export environment \n"
" variable HDF5_ROOT to the location. Rerun cmake \n"
"================================================================ \n"
)
elseif(HDF5_FOUND)
set(WITH_NSDF ON)
endif()

################################### TARGETS ####################################

link_directories(${CMAKE_BINARY_DIR})
Expand Down
4 changes: 2 additions & 2 deletions CheckCXXCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ add_definitions(-Wall
)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
message(FATAL_ERROR "Insufficient gcc version. Minimum requried 4.9")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1")
message(FATAL_ERROR "Insufficient gcc version. Minimum requried 5.1")
endif()
add_definitions( -Wno-unused-local-typedefs )
add_definitions( -fmax-errors=5 )
Expand Down