beman-project / exemplar

Example Beman project
Other
10 stars 16 forks source link

Use CMake Header File Sets #21

Closed bretbrownjr closed 1 month ago

bretbrownjr commented 1 month ago

The exemplar project should be using the CMake Header FILE_SET feature instead of separate include directories and install logic for headers.

Using CMake header file sets provides a more organized, maintainable, and modern approach to managing header files. It aligns with the target-based paradigm of modern CMake, reduces the need for manual commands, and makes the intent of the CMake configuration clearer.

Mentor Available: @bretbrownjr

wusatosi commented 1 month ago

I am interested in taking this! Is there any pointers you could provide for existing example uses of FILE_SET?

bretbrownjr commented 1 month ago

We used to use FILE_SETs. I'm unclear why it was removed. @neatudarius might have thoughts?

@wusatosi, when implementing this, mostly make sure that everything builds as expected and a cmake --install workflow installs the header files as expected.

If you want to go beyond what I had before, it does make sense to set VERIFY_INTERFACE_HEADER_SETS and build the all_verify_interface_header_sets CMake target. This will ensure each header builds correctly on its own. That CMake feature will require CMake 3.24, though.

neatudarius commented 1 month ago

We used to use FILE_SETs. I'm unclear why it was removed. @neatudarius might have thoughts?

@wusatosi, when implementing this, mostly make sure that everything builds as expected and a cmake --install workflow installs the header files as expected.

If you want to go beyond what I had before, it does make sense to set VERIFY_INTERFACE_HEADER_SETS and build the all_verify_interface_header_sets CMake target. This will ensure each header builds correctly on its own. That CMake feature will require CMake 3.24, though.

Probably I changed this by mistake. I agree with the revert.