Warn user about lack of hdf5

This commit is contained in:
Carles Fernandez 2017-11-18 01:06:57 +01:00
parent 8926821fa3
commit 2f05ba4726
2 changed files with 16 additions and 3 deletions

View File

@ -1491,7 +1491,21 @@ if(NOT MATIO_FOUND)
set(MATIO_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_STATIC_LIBRARY_SUFFIX} ${HDF5_LIBRARIES} ${ZLIB_LIBRARIES} )
set(MATIO_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/matio/include )
set(MATIO_LOCAL true)
else(HDF5_FOUND)
message(STATUS " The hdf5 library has not been found in your system.")
message(STATUS " Please try to install it by doing:")
if(OS_IS_MACOSX)
message(STATUS " $ sudo port install hdf5")
message(STATUS " or")
message(STATUS " $ brew install hdf5")
endif(OS_IS_MACOSX)
if(OS_IS_LINUX)
message(STATUS " $ sudo apt-get install libhdf5-dev")
endif(OS_IS_LINUX)
message(FATAL_ERROR "*** The hdf5 library is required to build gnss-sdr")
endif(HDF5_FOUND)
else(ZLIB_FOUND)
message(FATAL_ERROR "*** The zlib library is required to build gnss-sdr")
endif(ZLIB_FOUND)
endif(NOT MATIO_FOUND)

View File

@ -163,6 +163,8 @@ endif(GNUPLOT_FOUND)
if(MATIO_FOUND OR MATIO_LOCAL)
add_definitions(-DMATIO_TEST=1)
set(GNSS_SDR_TEST_OPTIONAL_LIBS "${GNSS_SDR_TEST_OPTIONAL_LIBS};${MATIO_LIBRARIES}")
set(GNSS_SDR_TEST_OPTIONAL_HEADERS "${GNSS_SDR_TEST_OPTIONAL_HEADERS};${MATIO_INCLUDE_DIRS}")
endif(MATIO_FOUND OR MATIO_LOCAL)
################################################################################
@ -323,8 +325,6 @@ include_directories(
${VOLK_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
${MATIO_INCLUDE_DIRS}
)
@ -359,7 +359,6 @@ if(ENABLE_UNIT_TESTING)
signal_processing_testing_lib
${VOLK_GNSSSDR_LIBRARIES}
${GNSS_SDR_TEST_OPTIONAL_LIBS}
${MATIO_LIBRARIES}
)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(run_tests gtest-${GNSSSDR_GTEST_LOCAL_VERSION})