Skip to content

Commit 9d30995

Browse files
authored
Patch min gcc5 hdf5default (#444)
* minimum gcc version is 5.X and hdf5 included in cmake as default * CMake correction
1 parent 6654aab commit 9d30995

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

CMakeLists.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,25 @@ if(WITH_BOOST OR WITH_BOOST_ODE)
105105
set(WITH_GSL OFF)
106106
endif()
107107

108+
find_package(HDF5 COMPONENTS CXX HL)
109+
110+
if (NOT HDF5_FOUND)
111+
message("==================================================================\n"
112+
" HDF5 not found. Disabling NSDF support.\n\n"
113+
" If you need NSDF support, please install hdf5-dev or hdf5-devel\n"
114+
" package or equivalent.\n\n"
115+
" $ sudo apt-get install libhdf5-dev \n"
116+
" $ sudo yum install libhdf5-devel \n"
117+
" $ brew install hdf5 \n\n"
118+
" Otherwise, continue with 'make' and 'make install' \n"
119+
" If you install hdf5 to non-standard path, export environment \n"
120+
" variable HDF5_ROOT to the location. Rerun cmake \n"
121+
"================================================================ \n"
122+
)
123+
elseif(HDF5_FOUND)
124+
set(WITH_NSDF ON)
125+
endif()
126+
108127
################################### TARGETS ####################################
109128

110129
link_directories(${CMAKE_BINARY_DIR})

CheckCXXCompiler.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ add_definitions(-Wall
2020
)
2121

2222
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
23-
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
24-
message(FATAL_ERROR "Insufficient gcc version. Minimum requried 4.9")
23+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1")
24+
message(FATAL_ERROR "Insufficient gcc version. Minimum requried 5.1")
2525
endif()
2626
add_definitions( -Wno-unused-local-typedefs )
2727
add_definitions( -fmax-errors=5 )

0 commit comments

Comments
 (0)