Skip to content

"requiredness" of find_package dependencies not modifiable by super-projects #33

@lizziel

Description

@lizziel

Several dependencies are hard-coded as REQUIRED in calls to find_package. This causes CMake configure problems when pFlogger is built in a super-project that does not use GMAO Baselibs.

pFlogger/CMakeLists.txt

Lines 36 to 38 in 25c3c6e

find_package (GFTL REQUIRED)
find_package (GFTL_SHARED REQUIRED)
find_package (YAFYAML REQUIRED)

The find_package calls can be made more flexible by using an IS_REQUIRED variable set at a higher level for whether the package must be found. For example:

find_package(GFTL ${GFTL_IS_REQUIRED_ARG} CONFIG)
find_package(GFTL_SHARED ${GFTL_SHARED_IS_REQUIRED_ARG} CONFIG)
find_package(YAFYAML ${YAFYAML_IS_REQUIRED_ARG} CONFIG) 

This issue is also relevant to find_package calls within CMakeLists.txt of MAPL and yaFyaml.

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