Skip to content

cet_make_library: Add support for FILE_SET installation and export #34

@greenc-FNAL

Description

@greenc-FNAL

Modern CMake (3.23+) supports FILE_SET for managing header installation and usage requirements. Currently, cet_make_library generates an install(TARGETS ...) command that does not include the FILE_SET arguments.

Example:

cet_make_library(LIBRARY_NAME my_lib ...)
target_sources(my_lib PUBLIC FILE_SET HEADERS FILES my_header.hpp)

Result:
This results in a CMake error during generation:
File set "HEADERS" is listed in interface file sets of my_lib but has not been exported

This happens because the install command generated by cet_make_library exports the target but fails to associate the file set with that export. Adding a manual install(TARGETS my_lib ... FILE_SET HEADERS) causes conflicts or doesn't resolve the issue cleanly because cet_make_library has already defined an install rule.

Request:
Update cet_make_library to accept FILE_SET arguments or automatically detect and forward FILE_SET properties to the generated install command.

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