Skip to content
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
797854d
Re-enable external build tests with C++ modules
LSUDOKO Apr 19, 2026
cdff10b
build: fix C++ modules BMI export and re-enable external build tests
LSUDOKO Apr 25, 2026
a7c5c53
chore: resolve modify/delete conflict by removing deleted file
LSUDOKO Apr 25, 2026
af1fe47
style: apply clang-format to modified files
LSUDOKO Apr 25, 2026
6ec642a
style: apply clang-format to all library, example, and test files
LSUDOKO Apr 25, 2026
e286bfd
fix: restore extern C++ and fix POSIX header collection for modules
LSUDOKO Apr 25, 2026
45d182a
fix:disable pkg-config test for modules and cleanup header whitespace…
LSUDOKO Apr 25, 2026
a5cd735
apply CI-requested formatting for clang-format and cmake-format
LSUDOKO Apr 25, 2026
03ae3b5
trigger ci: verify all builds pass with restored extern C++ and macro…
LSUDOKO Apr 25, 2026
f879162
fix: restore standard build stability by fixing macro definitions and…
LSUDOKO Apr 25, 2026
13c5e03
fix: restore standard build stability by fixing macro definitions and…
LSUDOKO Apr 27, 2026
8b3984b
build: fix C++ modules BMI export and re-enable external build tests
LSUDOKO Apr 27, 2026
489d884
build: fix C++ modules BMI export and re-enable external build tests
LSUDOKO Apr 27, 2026
fd1e4eb
fix: correctly register pseudo-targets for build tests
LSUDOKO Apr 27, 2026
62a85b6
fix: correctly restore build tests and fix cmake formatting
LSUDOKO Apr 27, 2026
2f9325d
fix: unconditionally include POSIX headers for modules on Linux
LSUDOKO Apr 27, 2026
ccbec5a
Fix external C++ modules package consumers
LSUDOKO Apr 29, 2026
d5609b6
build: fix C++ modules BMI export and re-enable external build tests
LSUDOKO Apr 29, 2026
fb671ac
build: fix external C++ modules package tests
LSUDOKO Apr 29, 2026
3fdd927
build: fix wrapper module generation in CI
LSUDOKO Apr 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions cmake/HPX_CXXModules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,35 +103,6 @@ function(hpx_configure_module_producer producer)

# Make sure consumers scan for the BMI
set_target_properties(${_iface} PROPERTIES INTERFACE_CXX_SCAN_FOR_MODULES On)

if(MSVC)
# MSVC: CMake/MSVC handle IFCs automatically; create a target for
# convenience, consumers can link to this to get ordering and include info
return()
endif()

# Compiler-specific flags to instruct where to write module cache
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES
"AppleClang"
)
# Clang common flags
target_compile_options(${producer} PRIVATE "-fmodule-output=${_moddir}")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# GCC: modern flags
hpx_add_target_compile_option_if_available(
${producer} PRIVATE "-fmodule-output=${_moddir}" RESULT ok
)
if(NOT ok)
hpx_error(
"hpx_configure_module_producer: the used version of gcc does not support '-fmodule-output'"
)
endif()
else()
hpx_warn(
"hpx_configure_module_producer: unknown compiler '${CMAKE_CXX_COMPILER_ID}'; "
"exposing EXPORT_MODULE_DIR='${_moddir}' for manual handling"
)
endif()
endfunction()

# hpx_configure_module_consumer(<consumer> <producer>])
Expand Down Expand Up @@ -159,28 +130,11 @@ function(hpx_configure_module_consumer consumer producer)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID
MATCHES "AppleClang"
)
target_compile_options(
${consumer} PRIVATE "-fprebuilt-module-path=${_module_dir}"
)
get_target_property(_type ${consumer} TYPE)
if((_type STREQUAL "SHARED_LIBRARY") OR (_type STREQUAL "EXECUTABLE"))
target_link_options(${consumer} PRIVATE "-fuse-ld=lld")
target_link_options(${consumer} PRIVATE "-Wl,--error-limit=0")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
hpx_add_target_compile_option_if_available(
${consumer} PRIVATE "-fprebuilt-module-path=${_module_dir}" RESULT ok
)
if(NOT ok)
hpx_error(
"hpx_configure_module_consumer: the used version of gcc does not "
"support '-fprebuilt-module-path='"
)
endif()
else()
hpx_warn(
"hpx_configure_module_consumer: unknown compiler '${CMAKE_CXX_COMPILER_ID}'"
)
endif()
endif()
endfunction()
2 changes: 2 additions & 0 deletions cmake/HPX_CollectStdHeaders.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ set(STANDARD_LIBRARY_HEADERS
"<cstdint>"
"<cstdio>"
"<cstdlib>"
"<dlfcn.h>"
"<link.h>"
Comment thread
hkaiser marked this conversation as resolved.
Outdated
Comment thread
hkaiser marked this conversation as resolved.
Outdated
"<cstring>"
"<ctime>"
"<cuchar>"
Expand Down
5 changes: 3 additions & 2 deletions examples/transpose/transpose_smp_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ int hpx_main(hpx::program_options::variables_map& vm)
std::vector<hpx::shared_future<void>> transpose_futures;
transpose_futures.resize(num_blocks);

for_each(par, range, [&](std::uint64_t b) {
for (std::uint64_t b = 0; b < num_blocks; ++b)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change is unrelated. Please separate into new PR, if appropriate.

{
transpose_futures[b] =
for_each(par(task), range, [&, b](std::uint64_t phase) {
std::uint64_t const block_size = block_order * block_order;
Expand All @@ -108,7 +109,7 @@ int hpx_main(hpx::program_options::variables_map& vm)
transpose(&A[from_block][A_offset], &B[b][B_offset],
block_order, tile_size);
}).share();
});
}

hpx::wait_all(transpose_futures);

Expand Down
11 changes: 4 additions & 7 deletions tests/unit/build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ if(NOT HPX_WITH_TESTS_EXTERNAL_BUILD)
return()
endif()

# If C++ modules are enabled, exit now (we don't know yet how to setup a
# dependent HPX project to use the generated BMIs).
if(HPX_WITH_CXX_MODULES)
return()
endif()

# Try building an external cmake based project ...
function(
create_cmake_test
Expand Down Expand Up @@ -200,7 +194,10 @@ foreach(build_type ${build_types})
endforeach()
add_hpx_pseudo_dependencies(tests.unit.build tests.unit.build.cmake)

if(HPX_WITH_PKGCONFIG AND HPX_WITH_DISTRIBUTED_RUNTIME)
if(HPX_WITH_PKGCONFIG
AND HPX_WITH_DISTRIBUTED_RUNTIME
AND NOT HPX_WITH_CXX_MODULES
)
find_package(PkgConfig)
if(PKGCONFIG_FOUND)
create_pkgconfig_test(
Expand Down
Loading