Skip to content

Commit

Permalink
Merge pull request #6510 from STEllAR-GROUP/fetch-boost-add-subdirectory
Browse files Browse the repository at this point in the history
Include Boost as CMake subproject
  • Loading branch information
hkaiser authored Feb 12, 2025
2 parents 9d3ce28 + 18e7a31 commit b3d750f
Show file tree
Hide file tree
Showing 19 changed files with 161 additions and 163 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/macos_debug_fetch_boost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
-DHPX_WITH_EXAMPLES=ON \
-DHPX_WITH_TESTS=ON \
-DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=2 \
-DHPX_WITH_CHECK_MODULE_DEPENDENCIES=On
-DHPX_WITH_CHECK_MODULE_DEPENDENCIES=On \
-DHPX_WITH_TESTS_EXTERNAL_BUILD=Off
- name: Build
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_clang_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_clang_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_debug_vs2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_debug_vs2022.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows_debug_vs2022_fetch_boost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on: [pull_request]
jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: jwlawson/[email protected]
Expand All @@ -21,7 +21,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_debug_vs2022_fetch_hwloc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_release_2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_release_2022.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_release_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
md C:\projects
$client = new-object System.Net.WebClient
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2022.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
$client.DownloadFile("https://rostam.cct.lsu.edu/download/builder/vcpkg-export-hpx-dependencies-2024.7z","C:\projects\vcpkg-export-hpx-dependencies.7z")
7z x C:\projects\vcpkg-export-hpx-dependencies.7z -y -oC:\projects\vcpkg
- name: Configure
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,7 @@ endif()

if(HPX_WITH_GENERIC_CONTEXT_COROUTINES)
# Check if we can use generic coroutine contexts without any problems
if(NOT Boost_CONTEXT_FOUND)
if(NOT (Boost_CONTEXT_FOUND OR TARGET Boost::context))
hpx_error(
"The usage of Boost.Context was selected but Boost.Context was not found."
)
Expand Down
3 changes: 3 additions & 0 deletions cmake/HPX_GeneratePackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ install(
)

# Install dir
set(HPX_CONFIG_IS_INSTALL ON)
configure_file(
cmake/templates/${HPX_PACKAGE_NAME}Config.cmake.in
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HPX_PACKAGE_NAME}Config.cmake"
Expand All @@ -76,6 +77,7 @@ if(HPX_WITH_PKGCONFIG)
endif()

# Build dir
set(HPX_CONFIG_IS_INSTALL OFF)
configure_file(
cmake/templates/${HPX_PACKAGE_NAME}Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/${HPX_PACKAGE_NAME}Config.cmake"
Expand All @@ -88,6 +90,7 @@ if(HPX_WITH_PKGCONFIG)
cmake/templates/hpxcxx.in "${CMAKE_CURRENT_BINARY_DIR}/bin/hpxcxx" @ONLY
)
endif()
unset(HPX_CONFIG_IS_INSTALL)

# Configure macros for the install dir ...
set(HPX_CMAKE_MODULE_PATH "\${CMAKE_CURRENT_LIST_DIR}")
Expand Down
19 changes: 13 additions & 6 deletions cmake/HPX_GeneratePackageUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,23 @@ function(hpx_sanitize_usage_requirements property is_build)

endfunction(hpx_sanitize_usage_requirements)

function(hpx_filter_cuda_flags cflag_list)
function(hpx_filter_language_flags cflag_list)
set(_cflag_list "${${cflag_list}}")
string(REGEX REPLACE "\\$<\\$<COMPILE_LANGUAGE:CUDA>:[^>]*>;?" "" _cflag_list
"${_cflag_list}"
# We are always in CXX, so replace conditional values with the values
# themselves
string(REGEX REPLACE "\\$<\\$<COMPILE_LANGUAGE:CXX>:([^>]*)>?" "\\1"
_cflag_list "${_cflag_list}"
)
# Remove conditional values for other languages
string(REGEX REPLACE "\\$<\\$<COMPILE_LANGUAGE:[^>]*>:([^>]*)>?" ""
_cflag_list "${_cflag_list}"
)

set(${cflag_list}
${_cflag_list}
PARENT_SCOPE
)
endfunction(hpx_filter_cuda_flags)
endfunction(hpx_filter_language_flags)

# Append the corresponding (-D, -I) flags for the compilation
function(
Expand Down Expand Up @@ -383,8 +390,8 @@ function(hpx_generate_pkgconfig_from_target target template is_build)
hpx_compile_definitions hpx_compile_options hpx_pic_option
hpx_include_directories hpx_system_include_directories hpx_cflags_list
)
# Cannot generate one file per language yet so filter out cuda
hpx_filter_cuda_flags(hpx_cflags_list)
# Generator expressions that depend on language must be filtered out
hpx_filter_language_flags(hpx_cflags_list)
hpx_construct_library_list(
hpx_link_libraries hpx_link_options hpx_library_list
)
Expand Down
Loading

0 comments on commit b3d750f

Please sign in to comment.