-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Description
I would like to request a fully-functional FindADIOS.cmake, which detects not only libadios and adios.h, but also all the dependent libraries.
So far, I have manually performed ADIOS detection in my code's CMakeLists.txt. This works for a minimal installation of ADIOS, but fails for an installation with all the various optional dependencies included (lustre, various Cray libraries, HDF5, NETCDF, etc.) that ADIOS may or may not require. When that fails, I typically just copy and paste flags from adios_config.flags into CMAKE_EXE_LINKER_FLAGS, but that is not an idiomatic CMake way of doing things, and introduces considerable burden on users of my code who are used to the standard way of using CMake.
find_path(ADIOS_INCLUDE_PATH adios.h)
if(NOT ADIOS_INCLUDE_PATH)
message(SEND_ERROR "Please set ADIOS_INCLUDE_PATH")
endif()
find_package(Threads) # pthreads seems to be required by mxml
list(APPEND libraries ${CMAKE_THREAD_LIBS_INIT})
find_library(ADIOS_LIBRARY NAMES adios)
if(NOT ADIOS_LIBRARY)
message(SEND_ERROR "Please set ADIOS_LIBRARY")
endif()
find_library(ADIOS_MXML_LIBRARY NAMES mxml)
if(NOT ADIOS_MXML_LIBRARY)
message(SEND_ERROR "Please set ADIOS_MXML_LIBRARY")
endif()
list(APPEND libraries ${ADIOS_LIBRARY})
list(APPEND libraries ${ADIOS_MXML_LIBRARY})
include_directories(${ADIOS_INCLUDE_PATH})
Metadata
Metadata
Assignees
Labels
No labels