Repository navigation
Module updates - #717
Open
justend29 wants to merge 8 commits into
Open
Module updates#717justend29 wants to merge 8 commits into
justend29 wants to merge 8 commits into
Conversation
justend29
marked this pull request as draft
October 6, 2026 17:32
justend29
marked this pull request as ready for review
October 6, 2026 17:57
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
Further use of my previous fixes to the C++ module installation rules revealed a few improvements.
Installed
Boost::ut_modulecouldn't be consumed with ClangThe compilation flags added in
WarningsAsErrors.cmakefor development leaked into the installinterface of the
Boost::utandBoost::ut_moduletargets, inheriting these aggressive flags.When using import std, Clang warns about the reserved module name
stdwhen compilingstd.ccfrom libstdc++ or libc++. With warnings treated as errors, Clang's
warningerror about thereserved module name prevented
Boost::ut_modulefrom being consumed, as it requires compilingstd.cc. Where
Boost::utwas interface-only, these leaky flags wouldn't have an effect, and be easily missed.Clang Warning
examples/parallel_runner failed to build with Clang
Tons of linker errors for TBB showed up with clang because
parallel_runnerwas disabled for other compilers. libstdc++requires TBB to use
<execution>, and the link was missing.Clang warns when angled includes are used in modules.
The previous PR linked
Boost::uttoBoost::ut_moduleto propagate target properties, includingINTERFACE_INCLUDE_DIRECTORIESfor headerut.hpp. With this, angled includes were added inut.cppm, as the public header could be correctly resolved.Clang Warning
Solution:
Wrap the compilation flags for development in the
$<BUILD_INTERFACE:>generator expression.Another option would be to PRIVATEly add them to each compiled target with
target_compile_options(<target> PRIVATE <flags>)instead of top-town withadd_compile_options(<flags>)Link TBB when using libstdc++. TBB has a config-file (TBBConfig.cmake). A simple
find_package()does the trick.<boost/ut.hpp>->"boost/ut.hpp"Use quotes to please Clang. Preserve the "boost/" include prefix, as just
"ut.hpp"will fail to match system include paths in consuming projects, and emit compiler warnings from the third-party ut.hpp header.Testing
A full build and test (including
from-ut-module) succeeds using GCC + libstdc++, Clang + libstdc++, and Clang + libc++.examples/parallel_runnerruns for each of them, too.Reviewers:
@kris-jusiak