Skip to content

FindADIOS.cmake #7

@andrewcorrigan

Description

@andrewcorrigan

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions