Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: add Boost::stacktrace ALIAS target for platform defaults #167

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

leha-bot
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

coverage: 86.35%. remained the same
when pulling e512d7c on leha-bot:feat/cmake-alias-target
into 66c0f7a on boostorg:develop.

@coveralls
Copy link

Coverage Status

coverage: 86.35%. remained the same
when pulling 30b472b on leha-bot:feat/cmake-alias-target
into 66c0f7a on boostorg:develop.

@apolukhin apolukhin merged commit 5747f85 into boostorg:develop Jun 20, 2024
8 checks passed
@pdimov
Copy link
Member

pdimov commented Jun 20, 2024

This change breaks the CMake build: https://github.com/boostorg/boost/actions/runs/9594246969/job/26456395308

@pdimov
Copy link
Member

pdimov commented Jun 20, 2024

Instead of

add_library(Boost::stacktrace ALIAS Boost::stacktrace_windbg)

use

add_library(Boost::stacktrace ALIAS boost_stacktrace_windbg)

and similarly for the other two.

@pdimov
Copy link
Member

pdimov commented Jun 20, 2024

Also, you need to add CMake jobs to your CI.

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

Can this please be fixed? It's breaking my boostorg/cmake CI and interfering with my work.

@leha-bot
Copy link
Contributor Author

Hello, yes, sorry; hotfix will be ready in no time.
I actually want to ping you to ask about proper boost_install() usage, as I also want to expose it from Boost-config.cmake

@leha-bot
Copy link
Contributor Author

#168

@pdimov , may you show the example with CMake CI? I will contribute it also in another PR, thanks in advance.

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

I actually want to ping you to ask about proper boost_install() usage, as I also want to expose it from Boost-config.cmake

This might not be easy because boost_install() has never been tested with ALIAS targets and probably doesn't work as-is.

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

The Timer CI may be the best starting point

https://github.com/boostorg/timer/blob/develop/.github/workflows/ci.yml#L268-L601

because it's a compiled library (although macos-11 would need to be replaced with macos-14 because macos-11 is going away.)

@leha-bot
Copy link
Contributor Author

Yes, thanks, will try to play on my own fork with both of them (boost_install() and CI), maybe will come up with some ideas about it. 👍

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

For the boost_install() part, maybe the way to do it is to declare boost_stacktrace as an INTERFACE library that links to the corresponding boost_stacktrace_... one. (Boost::stacktrace will be an ALIAS to boost_stacktrace as usual.)

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

I'm working on adding CI. Will look into the boost_stacktrace target next.

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

Added CMake CI to develop.

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

Added boost_stacktrace on a branch, but there are weird failures on macos-12 and macos-14. I'm not sure why they happen and what I need to do about them.

macos-12 is just this

/Users/runner/work/stacktrace/boost-root/libs/stacktrace/test/test.cpp(279): test 'boost::stacktrace::stacktrace(1, 1).size() == 1' failed in function 'int main()'
1 error detected.

(https://github.com/boostorg/stacktrace/actions/runs/9617263707/job/26528655980)
whereas macos-14 is more convoluted and probably caused by inlining (https://github.com/boostorg/stacktrace/actions/runs/9617263707/job/26528657050).

@pdimov
Copy link
Member

pdimov commented Jun 21, 2024

Added the Boost::stacktrace library (now properly installed and tested) to develop.

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.

4 participants