Skip to content

Conversation

@ClausKlein
Copy link
Collaborator

@ClausKlein ClausKlein commented Nov 14, 2024

I often use project_options (see, for example: Sanitizers.cmake). This makes most CMake tasks simpler!

@ClausKlein ClausKlein marked this pull request as draft November 14, 2024 19:42
Comment on lines +9 to +13
if(CMAKE_BUILD_TYPE STREQUAL Debug)
target_link_libraries(${TARGET_LIBRARY} PUBLIC $<BUILD_INTERFACE:${TARGET_LIBRARY}_project_options>)
target_link_libraries(${TARGET_LIBRARY} PUBLIC $<BUILD_INTERFACE:${TARGET_LIBRARY}_project_warnings>)
endif()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: very important to NOT export the build debug options!

@ClausKlein ClausKlein marked this pull request as ready for review November 15, 2024 07:40
Copy link
Member

@dietmarkuehl dietmarkuehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming a similar dependency will be added to beman/exemplar. Effectively, I hope that beman/execution26 can eventually have a copy of what beman/exemplar does just with the project specifics changed (currently, I'm not tracking the changes, though).

@dietmarkuehl dietmarkuehl merged commit b8b689b into bemanproject:main Nov 15, 2024
9 of 10 checks passed
@wusatosi
Copy link
Member

I'm assuming a similar dependency will be added to beman/exemplar. Effectively, I hope that beman/execution26 can eventually have a copy of what beman/exemplar does just with the project specifics changed (currently, I'm not tracking the changes, though).

My $.02 is, I am not the biggest fan for CMake having dependencies, we ideally should minimize the amount of FetchContent to configure a project. This does look like a useful CMake tool, I will bring this up at next sync and see what everyone thinks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants