Adjusted all paths for HDF5
This commit is contained in:
parent
0096b696a3
commit
bd6853d96d
@ -51,12 +51,6 @@ ENDIF(YORICK_SUPPORT)
|
||||
find_program(CYTHON cython)
|
||||
find_library(ZLIB z)
|
||||
|
||||
if(HDF5_ROOTDIR)
|
||||
SET(ENV{HDF5_ROOT} ${HDF5_ROOTDIR})
|
||||
endif(HDF5_ROOTDIR)
|
||||
find_package(HDF5 COMPONENTS CXX HL)
|
||||
|
||||
|
||||
set(NETCDF_FIND_REQUIRED ${YORICK_SUPPORT})
|
||||
set(GSL_FIND_REQUIRED TRUE)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NetCDF DEFAULT_MSG NETCDF_LIBRARY NETCDFCPP_LIBRARY NETCDF_INCLUDE_PATH)
|
||||
|
19
external/external_build.cmake
vendored
19
external/external_build.cmake
vendored
@ -67,24 +67,19 @@ if (INTERNAL_HDF5)
|
||||
)
|
||||
SET(cosmotool_DEPS ${cosmotool_DEPS} hdf5)
|
||||
SET(hdf5_built hdf5)
|
||||
set(HDF5_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5.a CACHE STRING "HDF5 lib" FORCE)
|
||||
set(HDF5_CPP_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_cpp.a CACHE STRING "HDF5 C++ lib" FORCE)
|
||||
set(HDF5_HL_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_hl.a CACHE STRING "HDF5-HL lib" FORCE)
|
||||
set(HDF5_HL_CPP_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_hl_cpp.a CACHE STRING "HDF5-HL C++ lib" FORCE)
|
||||
SET(HDF5_INCLUDE_PATH ${HDF5_BIN_DIR}/include CACHE STRING "HDF5 include path" FORCE)
|
||||
SET(ENV{HDF5_ROOT} ${HDF5_BIN_DIR})
|
||||
SET(HDF5_ROOTDIR ${HDF5_BIN_DIR})
|
||||
SET(CONFIGURE_LDFLAGS "${CONFIGURE_LDFLAGS} -L${HDF5_BIN_DIR}/lib")
|
||||
SET(CONFIGURE_LIBS "${CONFIGURE_LIBS} -ldl")
|
||||
else (INTERNAL_HDF5)
|
||||
find_path(HDF5_INCLUDE_PATH hdf5.h)
|
||||
find_library(HDF5_LIBRARY hdf5)
|
||||
find_library(HDF5_CPP_LIBRARY hdf5_cpp)
|
||||
find_library(HDF5_HL_CPP_LIBRARY hdf5_hl_cpp)
|
||||
find_library(HDF5_HL_LIBRARY hdf5_hl)
|
||||
if(HDF5_ROOTDIR)
|
||||
SET(ENV{HDF5_ROOT} ${HDF5_ROOTDIR})
|
||||
endif(HDF5_ROOTDIR)
|
||||
endif (INTERNAL_HDF5)
|
||||
SET(CONFIGURE_CPP_FLAGS "${CONFIGURE_CPP_FLAGS} -I${HDF5_INCLUDE_PATH}")
|
||||
mark_as_advanced(HDF5_INCLUDE_PATH HDF5_LIBRARY HDF5_CPP_LIBRARY HDF5_HL_LIBRARY HDF5_HL_CPP_LIBRARY)
|
||||
find_package(HDF5 COMPONENTS C CXX HL)
|
||||
mark_as_advanced(HDF5_INCLUDE_DIR HDF5_LIBRARY HDF5_HL_LIBRARY)
|
||||
|
||||
SET(CONFIGURE_CPP_FLAGS "${CONFIGURE_CPP_FLAGS} -I${HDF5_INCLUDE_DIR}")
|
||||
|
||||
###############
|
||||
# Build NetCDF
|
||||
|
@ -35,8 +35,7 @@ add_executable(testPool testPool.cpp)
|
||||
target_link_libraries(testPool ${tolink})
|
||||
|
||||
if (HDF5_FOUND)
|
||||
include_directories(${HDF5_INCLUDE_PATH})
|
||||
SET(tolink ${tolink} ${HDF5_CPP_LIBRARY} ${HDF5_LIBRARY} ${ZLIB})
|
||||
include_directories(${HDF5_INCLUDE_DIR})
|
||||
|
||||
add_executable(testReadFlash testReadFlash.cpp)
|
||||
target_link_libraries(testReadFlash ${tolink})
|
||||
|
@ -76,7 +76,7 @@ if(YORICK_SUPPORT)
|
||||
include_directories(${NETCDF_INCLUDE_PATH} ${NETCDFCPP_INCLUDE_PATH})
|
||||
endif(YORICK_SUPPORT)
|
||||
if (HDF5_FOUND)
|
||||
set(CosmoTool_LIBS ${CosmoTool_LIBS} ${HDF5_CXX_LIBRARIES} ${HDF5_LIBRARIES})
|
||||
set(CosmoTool_LIBS ${CosmoTool_LIBS} ${HDF5_CXX_LIBRARY} ${HDF5_C_LIBRARY} ${ZLIB})
|
||||
include_directories(${HDF5_INCLUDE_DIRS})
|
||||
endif (HDF5_FOUND)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user