Skip to content

Commit af6bf75

Browse files
author
Hackathon User
committed
fix: add missing static_linker_check.hpp and resolve CI failures
1 parent c915907 commit af6bf75

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

libs/core/config/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set(config_macro_headers
2727
hpx/config/forward.hpp
2828
hpx/config/manual_profiling.hpp
2929
hpx/config/move.hpp
30+
hpx/config/static_linker_check.hpp
3031
hpx/config/threads_stack.hpp
3132
hpx/config/warnings_prefix.hpp
3233
hpx/config/warnings_suffix.hpp
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) 2026 The STE||AR-Group
2+
//
3+
// SPDX-License-Identifier: BSL-1.0
4+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#pragma once
8+
9+
#include <hpx/config/export_definitions.hpp>
10+
11+
#if defined(HPX_HAVE_DYNAMIC_HPX_MAIN)
12+
#if (defined(__linux) || defined(__linux__) || defined(linux) || defined(__APPLE__)) && defined(HPX_HAVE_STATIC_LINKING) && !defined(HPX_HAVE_WRAP_MAIN_CONFIGURED)
13+
#warning "You are statically linking HPX on Linux/macOS while using hpx_main.hpp. Please ensure you manually configure the linker to use wrap_main, or use the CMake target HPX::wrap_main to avoid linking errors."
14+
#endif
15+
#endif

wrap/include/hpx/hpx_main.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#pragma once
99

10-
#include <hpx/wrap_main.hpp>
1110
#include <hpx/config/static_linker_check.hpp>
11+
#include <hpx/wrap_main.hpp>
1212

1313
#if defined(HPX_HAVE_RUN_MAIN_EVERYWHERE)
1414

0 commit comments

Comments
 (0)