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: require Boost unit_test_framework #10260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Al2Klimov
Copy link
Member

Even with -DICINGA2_WITH_TESTS=ON -DBUILD_TESTING=ON CLion (and likely not only it) doesn't recognize any test/ files as part of the project, nor allows them to run without the unit_test_framework.

@yhabteab Again thank you for your help with fixing missing unit_test_framework on my WS.

Even with `-DICINGA2_WITH_TESTS=ON -DBUILD_TESTING=ON` CLion (and likely not only it) doesn't recognize any test/ files as part of the project, nor allows them to run without the unit_test_framework.
@cla-bot cla-bot bot added the cla/signed label Nov 27, 2024
@Al2Klimov
Copy link
Member Author

All packages still build! 🎉 https://git.icinga.com/packages/icinga2/-/pipelines/34928

@Al2Klimov Al2Klimov requested a review from yhabteab November 29, 2024 09:12
@Al2Klimov Al2Klimov requested a review from oxzi January 9, 2025 12:19
@oxzi oxzi removed their request for review January 14, 2025 12:42
Copy link
Member

@yhabteab yhabteab left a comment

Choose a reason for hiding this comment

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

Why not just make this search required instead of silently (QUIET) suppressing it?

if(NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY)
find_package(Boost 1.34.0 QUIET COMPONENTS unit_test_framework)
endif()

Copy link
Member Author

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

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

AFAIK this is 3rd party stuff we're just shipping.

@@ -173,7 +173,7 @@ else()
set(LOGROTATE_CREATE "\n\tcreate 644 ${ICINGA2_USER} ${ICINGA2_GROUP}")
endif()

find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS coroutine context date_time filesystem iostreams thread system program_options regex REQUIRED)
find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS coroutine context date_time filesystem iostreams thread system program_options regex unit_test_framework REQUIRED)
Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like a central list where one can look up once what we require.

@yhabteab
Copy link
Member

AFAIK this is 3rd party stuff we're just shipping.

It's a third-party code, but no one forbids us to modify it to suit our needs, such as this PR #7780 or #9732. Why make an exception now?

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

Successfully merging this pull request may close these issues.

2 participants