Skip to content

Set *_FOUND variable in Find*.cmake modules #1192

@PatKamin

Description

@PatKamin

Rationale

Currently, different paths like ie. LIBHWLOC_LIBRARIES, LIBHWLOC_INCLUDE_DIRS are checked throughout CMake to make sure that the given library was found. These are set in Find* CMake modules. This kind of checks for a presence of a library shall be replaced by checking one variable, ie. LIBHWLOC_FOUND. This would be easier to maintain.

This can be done ie. with find_package_handle_standard_args:

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(

    hwloc

    DEFAULT_MSG

    HWLOC_LIBRARY

    HWLOC_INCLUDE_DIR

)

This would set HWLOC_FOUND variable if both HWLOC_LIBRARY and HWLOC_INCLUDE_DIR contain valid paths.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions