Fixup for supporting system installed HDF5 and Eigen

This commit is contained in:
Guilhem Lavaux 2018-11-01 14:32:00 +01:00
parent 6ab5df28f3
commit d0533f3235
2 changed files with 6 additions and 3 deletions

View File

@ -25,7 +25,7 @@ MACRO(CHECK_CHANGE_STATE VAR)
ENDMACRO(CHECK_CHANGE_STATE) ENDMACRO(CHECK_CHANGE_STATE)
CHECK_CHANGE_STATE(INTERNAL_BOOST Boost_LIBRARIES Boost_INCLUDE_DIRS) CHECK_CHANGE_STATE(INTERNAL_BOOST Boost_LIBRARIES Boost_INCLUDE_DIRS)
CHECK_CHANGE_STATE(INTERNAL_EIGEN EIGEN3_INCLUDE_DIRS) CHECK_CHANGE_STATE(INTERNAL_EIGEN EIGEN3_INCLUDEDIR)
CHECK_CHANGE_STATE(INTERNAL_GSL GSL_LIBRARY GSL_CBLAS_LIBRARY GSL_INCLUDE) CHECK_CHANGE_STATE(INTERNAL_GSL GSL_LIBRARY GSL_CBLAS_LIBRARY GSL_INCLUDE)
CHECK_CHANGE_STATE(INTERNAL_HDF5 CHECK_CHANGE_STATE(INTERNAL_HDF5
HDF5_INCLUDE_DIR HDF5_LIBRARIES HDF5_CXX_LIBRARIES HDF5_INCLUDE_DIR HDF5_LIBRARIES HDF5_CXX_LIBRARIES
@ -338,7 +338,7 @@ IF (INTERNAL_EIGEN)
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
) )
SET(EIGEN3_INCLUDE_DIRS ${EXT_INSTALL}/include/eigen3) SET(EIGEN3_INCLUDEDIR ${EXT_INSTALL}/include/eigen3)
ELSE (INTERNAL_EIGEN) ELSE (INTERNAL_EIGEN)
if(DEFINED EIGEN_PATH) if(DEFINED EIGEN_PATH)
@ -352,6 +352,9 @@ ELSE (INTERNAL_EIGEN)
if (NOT EIGEN3_FOUND) if (NOT EIGEN3_FOUND)
cmessage(CWARNING "Eigen library not found") cmessage(CWARNING "Eigen library not found")
else() else()
IF(EIGEN3_STATIC_INCLUDE_DIRS)
SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_STATIC_INCLUDE_DIRS})
ENDIF()
cmessage(STATUS "Found EIGEN3 in ${EIGEN3_INCLUDE_DIRS}") cmessage(STATUS "Found EIGEN3 in ${EIGEN3_INCLUDE_DIRS}")
endif() endif()
ENDIF(INTERNAL_EIGEN) ENDIF(INTERNAL_EIGEN)

View File

@ -40,7 +40,7 @@ if (HDF5_FOUND)
) )
target_include_directories(CosmoHDF5 BEFORE PRIVATE ${HDF5_INCLUDE_DIR}) target_include_directories(CosmoHDF5 BEFORE PRIVATE ${HDF5_INCLUDE_DIR})
else(HDF5_FOUND) else(HDF5_FOUND)
add_library(CosmoHdf5 OBJECT add_library(CosmoHDF5 OBJECT
loadFlash_dummy.cpp loadFlash_dummy.cpp
) )
endif (HDF5_FOUND) endif (HDF5_FOUND)