Added dummy function in case HDF5 is not found
This commit is contained in:
parent
0eb308f1d0
commit
f94e2912d4
2 changed files with 21 additions and 2 deletions
|
@ -16,6 +16,10 @@ if (HDF5_FOUND)
|
|||
h5_readFlash.cpp
|
||||
loadFlash.cpp
|
||||
)
|
||||
else(HDF5_FOUND)
|
||||
set(CosmoTool_SRCS ${CosmoTool_SRCS}
|
||||
loadFlash_dummy.cpp
|
||||
)
|
||||
endif (HDF5_FOUND)
|
||||
|
||||
SET(CosmoTool_SRCS ${CosmoTool_SRCS}
|
||||
|
@ -43,7 +47,6 @@ SET(CosmoTool_SRCS ${CosmoTool_SRCS}
|
|||
)
|
||||
|
||||
include_directories(${GSL_INCLUDE_PATH} ${NETCDF_INCLUDE_PATH})
|
||||
add_library(CosmoTool ${CosmoTool_SRCS})
|
||||
|
||||
set(CosmoTool_LIBS ${NETCDF_LIBRARY} ${NETCDFCPP_LIBRARY} ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY})
|
||||
if (HDF5_FOUND)
|
||||
|
@ -51,12 +54,27 @@ if (HDF5_FOUND)
|
|||
include_directories(${HDF5_INCLUDE_DIRS})
|
||||
endif (HDF5_FOUND)
|
||||
|
||||
target_link_libraries(CosmoTool ${CosmoTool_LIBS})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_library(CosmoTool SHARED ${CosmoTool_SRCS})
|
||||
target_link_libraries(CosmoTool ${CosmoTool_LIBS})
|
||||
|
||||
if (BUILD_STATIC_LIBS)
|
||||
add_library(CosmoTool_static STATIC ${CosmoTool_SRCS})
|
||||
endif(BUILD_STATIC_LIBS)
|
||||
else (BUILD_SHARED_LIBS)
|
||||
add_library(CosmoTool STATIC ${CosmoTool_LIBS})
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
install(TARGETS CosmoTool
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
install(TARGETS CosmoTool_static
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
install(DIRECTORY . DESTINATION include/CosmoTool
|
||||
FILES_MATCHING PATTERN "*.hpp")
|
||||
install(DIRECTORY . DESTINATION include/CosmoTool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue