Skip to content

Commit fb671ac

Browse files
committed
build: fix external C++ modules package tests
1 parent d5609b6 commit fb671ac

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

cmake/HPX_GeneratePackage.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.28")
2525
set(_cxx_modules_directory_arg CXX_MODULES_DIRECTORY cxx-modules)
2626
endif()
2727

28-
# Export HPXInternalTargets in the build directory. Use the EXPORT
29-
# signature so CMake also generates the per-target C++ module metadata files.
28+
# Export HPXInternalTargets in the build directory. Use the EXPORT signature so
29+
# CMake also generates the per-target C++ module metadata files.
3030
export(
3131
EXPORT HPXInternalTargets
3232
NAMESPACE HPXInternal::
3333
FILE "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/HPXInternalTargets.cmake"
34-
${_cxx_modules_directory_arg}
34+
${_cxx_modules_directory_arg}
3535
)
3636

3737
# Export HPXInternalTargets in the install directory
@@ -44,13 +44,13 @@ install(
4444
COMPONENT cmake
4545
)
4646

47-
# Export HPXTargets in the build directory. Use the EXPORT signature so
48-
# CMake also generates the per-target C++ module metadata files.
47+
# Export HPXTargets in the build directory. Use the EXPORT signature so CMake
48+
# also generates the per-target C++ module metadata files.
4949
export(
5050
EXPORT HPXTargets
5151
NAMESPACE HPX::
5252
FILE "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/HPXTargets.cmake"
53-
${_cxx_modules_directory_arg}
53+
${_cxx_modules_directory_arg}
5454
)
5555

5656
# Add aliases with the namespace for use within HPX
@@ -92,7 +92,7 @@ endif()
9292
set(HPX_CONFIG_IS_INSTALL OFF)
9393
configure_file(
9494
${CMAKE_CURRENT_LIST_DIR}/templates/${HPX_PACKAGE_NAME}Config.cmake.in
95-
"${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/${HPX_PACKAGE_NAME}ConfigVersion.cmake"
95+
"${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/${HPX_PACKAGE_NAME}Config.cmake"
9696
ESCAPE_QUOTES
9797
@ONLY
9898
)

examples/hello_world_component/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ if(EXISTS "${HPX_DIR}")
4444
endif()
4545
target_link_libraries(
4646
hello_world_client PRIVATE HPX::hpx HPX::wrap_main
47-
${hpx_cxx_module_targets}
47+
${hpx_cxx_module_targets}
4848
)
4949

5050
# We still support not linking to HPX::wrap_main when

tests/unit/build/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ function(
7373
VERBATIM
7474
)
7575
add_dependencies(${name} hpx hpx_init hpx_wrap)
76+
if(HPX_WITH_CXX_MODULES)
77+
if(TARGET hpx_core_module)
78+
add_dependencies(${name} hpx_core_module)
79+
endif()
80+
if(TARGET hpx_full_module)
81+
add_dependencies(${name} hpx_full_module)
82+
endif()
83+
endif()
7684
if(HPX_WITH_DISTRIBUTED_RUNTIME)
7785
add_dependencies(${name} iostreams_component)
7886
endif()

0 commit comments

Comments
 (0)