Skip to content

Commit

Permalink
Explicitly reference symbols to re-export
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jun 28, 2019
1 parent d767b6a commit c533b89
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions libs/config/CMakeLists.txt
Expand Up @@ -33,6 +33,7 @@ set(config_headers

# Default location is $HPX_ROOT/libs/config/src
set(config_sources
force_linking.cpp
version.cpp
)

Expand Down
21 changes: 21 additions & 0 deletions libs/config/src/force_linking.cpp
@@ -0,0 +1,21 @@
// Copyright (c) 2019 The STE||AR GROUP
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <hpx/config/force_linking.hpp>
#include <hpx/config/version.hpp>

namespace hpx { namespace config
{
// reference all symbols that have to be explicitly linked with the core
// library
void force_linking()
{
const char* const hpx_version = hpx::HPX_CHECK_VERSION;
const char* const boost_version = hpx::HPX_CHECK_BOOST_VERSION;
(void)hpx_version;
(void)boost_version;
}
}}

5 changes: 0 additions & 5 deletions libs/config/src/version.cpp
Expand Up @@ -18,9 +18,4 @@ namespace hpx
HPX_PP_STRINGIZE(HPX_CHECK_VERSION);
HPX_EXPORT char const HPX_CHECK_BOOST_VERSION[] =
HPX_PP_STRINGIZE(HPX_CHECK_BOOST_VERSION);

namespace config
{
void force_linking() {}
}
}

0 comments on commit c533b89

Please sign in to comment.