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: Use import targets in FindDEAL_II_BOOST.cmake #15254

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tamiko
Copy link
Member

@tamiko tamiko commented May 22, 2023

Depends on #15252 #15253

@tamiko tamiko marked this pull request as draft May 22, 2023 22:11
@tamiko
Copy link
Member Author

tamiko commented May 22, 2023

@masterleinad This is the goal 😄 (this here works with all pull requests merged and with CMake 3.19 onwards).

@tamiko tamiko marked this pull request as ready for review May 23, 2023 08:58
@tamiko tamiko changed the title CMake: Use imported targets in FindDEAL_II_BOOST.cmake CMake: Use import targets in FindDEAL_II_BOOST.cmake May 23, 2023
@masterleinad
Copy link
Member

Found Boost: /home/runner/work/dealii/boost (found suitable version "1.74.0", minimum required is "1.59") found components: iostreams serialization system thread missing components: regex chrono date_time atomic
-- Processing BOOST variables and targets
-- Processing BOOST variables and targets - Done
-- Performing Test BOOST_IOSTREAMS_USABLE
-- Performing Test BOOST_IOSTREAMS_USABLE - Failed
-- Performing Test DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS_OK
-- Performing Test DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS_OK - Failed
-- Test unsuccessful, define DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
-- 
-- Defining target: interface_boost
--     VERSION:             1.74.0
--     IMPORTED TARGETS:    Boost::iostreams;Boost::serialization;Boost::system;Boost::thread
--     copying Boost::iostreams into interface_boost ...
CMake Error at cmake/macros/macro_copy_target_properties.cmake:86 (message):
  Undefined imported target name »Boost::regex« present in interface of
  target »Boost::iostreams«.

I'm surprised that we are suddenly seeing BOOST_IOSTREAMS_USABLE failing.

@tamiko
Copy link
Member Author

tamiko commented May 24, 2023

@masterleinad This probably comes from the fact that this particular FindBoost.cmake version forgets to also export dependent targets. Let me push a fix.

So with a full Boost installation with version 1.74 onwards everything configures as expected.

With version 1.71 we see a failure with the serialization check.

With a custom-installed version 1.74 CMake is unable to find some modules but the find module emits these targets nevertheless:

2023-05-24T08:25:15.5140159Z -- Found Boost: /home/runner/work/dealii/boost (found suitable version "1.74.0", minimum required is "1.59") found components: iostreams serialization system thread missing components: regex chrono date_time atomic

@tamiko
Copy link
Member Author

tamiko commented May 24, 2023

Update: oops the boost serialization test does not work at all with import targets. We simply don't see it for boost 1.74 onwards because we skip this expensive check in this case.

@tamiko tamiko added this to the Release 9.6 milestone Jul 4, 2023
@tamiko tamiko marked this pull request as draft July 4, 2023 18:42
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.

None yet

2 participants