Skip to content

Commit

Permalink
Try #436:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Sep 19, 2022
2 parents a8dc3a1 + fb473a0 commit 9809fe5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ setup_arm64_machine: &setup_arm64_machine

docker_default: &docker_default
docker:
- image: pikaorg/pika-ci-base:8
- image: pikaorg/pika-ci-base:9

defaults: &defaults
<<: *working_dir_default
Expand Down
41 changes: 7 additions & 34 deletions cmake/pika_setup_p2300.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,19 @@
# 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)

if(PIKA_WITH_P2300_REFERENCE_IMPLEMENTATION AND NOT PIKA_FIND_PACKAGE)
if(PIKA_WITH_P2300_REFERENCE_IMPLEMENTATION)

if(PIKA_WITH_CXX_STANDARD LESS 20)

pika_error(
"PIKA_WITH_P2300_REFERENCE_IMPLEMENTATION requires at least C++20 (PIKA_WITH_CXX_STANDARD is currently ${PIKA_WITH_CXX_STANDARD})"
)
endif()

include(FetchContent)

fetchcontent_declare(
P2300
GIT_REPOSITORY https://github.com/brycelelbach/wg21_P2300_std_execution.git
GIT_TAG 063fd9a9e8d9c0284f795f5342e057b3bc428202
)
fetchcontent_getproperties(P2300)
if(NOT p2300_POPULATED)
fetchcontent_populate(P2300)
endif()

add_library(P2300 INTERFACE)
target_include_directories(
P2300 SYSTEM INTERFACE "$<BUILD_INTERFACE:${p2300_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
target_compile_features(P2300 INTERFACE cxx_std_20)

install(
TARGETS P2300
EXPORT pika_internal_targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT core
)
pika_export_internal_targets(P2300)

install(
DIRECTORY "${p2300_SOURCE_DIR}/include/"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
COMPONENT core
)
pika_find_package(p2300 REQUIRED)
if(NOT PIKA_FIND_PACKAGE)
target_link_libraries(pika_base_libraries INTERFACE P2300::p2300)
endif()

target_link_libraries(pika_base_libraries INTERFACE P2300)
endif()
2 changes: 2 additions & 0 deletions cmake/templates/pika-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ include(pika_setup_cuda)

include(pika_setup_mpi)

include(pika_setup_p2300)

# APEX
set(PIKA_APEX_ROOT "@APEX_ROOT@")
include(pika_setup_apex)
Expand Down

0 comments on commit 9809fe5

Please sign in to comment.