Skip to content

Commit

Permalink
Generate force_linking.hpp header for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Jun 28, 2019
1 parent 11c1302 commit ca57c84
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 36 deletions.
20 changes: 17 additions & 3 deletions cmake/HPX_AddModule.cmake
Expand Up @@ -100,12 +100,26 @@ function(add_hpx_module name)
)
endif()

set(force_linking_header "${CMAKE_BINARY_DIR}/hpx/${name}/force_linking.hpp")
# Add a header to force linking of modules on Windows
FILE(WRITE ${force_linking_header}
"// Copyright (c) 2019 The STE||AR GROUP\n"
"//\n"
"// Distributed under the Boost Software License, Version 1.0. (See accompanying\n"
"// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n"
"\n"
"namespace hpx { namespace config\n"
"{\n"
" void force_linking();\n"
"}}\n"
)

foreach(header_file ${headers})
hpx_debug(${header_file})
endforeach(header_file)

add_library(hpx_${name} STATIC ${sources} ${headers} ${global_header} ${compat_headers})

target_link_libraries(hpx_${name} ${${name}_DEPENDENCIES})
target_include_directories(hpx_${name} PUBLIC
$<BUILD_INTERFACE:${HEADER_ROOT}>
Expand Down Expand Up @@ -173,7 +187,7 @@ function(add_hpx_module name)
COMPONENT ${name}
)
endif()

write_config_defines_file(
NAMESPACE ${name_upper}
FILENAME "${CMAKE_BINARY_DIR}/hpx/${name}/config/defines.hpp")
Expand All @@ -185,5 +199,5 @@ function(add_hpx_module name)
foreach(dir ${${name}_CMAKE_SUBDIRS})
add_subdirectory(${dir})
endforeach(dir)

endfunction(add_hpx_module)
1 change: 0 additions & 1 deletion libs/cache/CMakeLists.txt
Expand Up @@ -9,7 +9,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# Default location is $HPX_ROOT/libs/cache/include
set(cache_headers
hpx/cache/force_linking.hpp
hpx/cache/local_cache.hpp
hpx/cache/lru_cache.hpp
hpx/cache/entries/entry.hpp
Expand Down
10 changes: 0 additions & 10 deletions libs/cache/include/hpx/cache/force_linking.hpp

This file was deleted.

1 change: 0 additions & 1 deletion libs/config/CMakeLists.txt
Expand Up @@ -22,7 +22,6 @@ set(config_headers
hpx/config/emulate_deleted.hpp
hpx/config/export_definitions.hpp
hpx/config/forceinline.hpp
hpx/config/force_linking.hpp
hpx/config/lambda_capture.hpp
hpx/config/manual_profiling.hpp
hpx/config/threads_stack.hpp
Expand Down
10 changes: 0 additions & 10 deletions libs/config/include/hpx/config/force_linking.hpp

This file was deleted.

1 change: 0 additions & 1 deletion libs/preprocessor/CMakeLists.txt
Expand Up @@ -12,7 +12,6 @@ set(preprocessor_headers
hpx/preprocessor/cat.hpp
hpx/preprocessor/config.hpp
hpx/preprocessor/expand.hpp
hpx/preprocessor/force_linking.hpp
hpx/preprocessor/nargs.hpp
hpx/preprocessor/stringize.hpp
hpx/preprocessor/strip_parens.hpp
Expand Down
10 changes: 0 additions & 10 deletions libs/preprocessor/include/hpx/preprocessor/force_linking.hpp

This file was deleted.

0 comments on commit ca57c84

Please sign in to comment.