Skip to content

Commit 3fdd927

Browse files
committed
build: fix wrapper module generation in CI
1 parent fb671ac commit 3fdd927

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

cmake/templates/hpx.ixx.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export module HPX.@cap_libname@;
2323
// Make sure the exported symbols are name-mangled using standard C++ rules.
2424
// This is necessary as otherwise the symbols exported from the shared libraries
2525
// will be exported from the module using a differently encoded name.
26-
extern "C++" {
27-
2826
#if defined(HPX_MSVC)
2927
// disable warning C5244: '#include <filename>' in the purview of module
3028
// 'HPX.@cap_libname@' appears erroneous. Consider moving that directive before the
@@ -51,5 +49,3 @@ extern "C++" {
5149
#if defined(HPX_MSVC)
5250
#pragma warning(pop)
5351
#endif
54-
55-
} // extern "C++"

libs/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,11 @@ foreach(lib ${HPX_LIBS})
338338
# src/CMakeLists.txt. When all of hpx_full has been modularized the target
339339
# creation can move here as well.
340340
if(HPX_WITH_CXX_MODULES)
341+
if(NOT TARGET hpx_modules)
342+
add_custom_target(hpx_modules ALL)
343+
set_target_properties(hpx_modules PROPERTIES FOLDER "Core")
344+
endif()
345+
341346
add_library(hpx_${lib}_module STATIC)
342347
set_target_properties(
343348
hpx_${lib}_module PROPERTIES POSITION_INDEPENDENT_CODE ON
@@ -353,6 +358,7 @@ foreach(lib ${HPX_LIBS})
353358
PRIVATE hpx_private_flags
354359
)
355360
set_target_properties(hpx_${lib}_module PROPERTIES FOLDER "Core")
361+
add_dependencies(hpx_modules hpx_${lib}_module)
356362

357363
add_hpx_source_group(
358364
NAME hpx_${lib}_module

0 commit comments

Comments
 (0)