Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
a5c5ba7
Mock of ttg::make_device_tt and views
devreal Oct 13, 2022
dad4a6c
Add new header to CMake files
devreal Oct 14, 2022
977048d
Add device_mock example to compile the ttg device mock API
devreal Oct 20, 2022
b86f1b0
[example/device_mock] added missing #include
evaleev Oct 20, 2022
834f5f2
[example/device_mock] declare as off-limits to clang-format
evaleev Oct 20, 2022
cb9b74f
[example/device_mock] cleanup
evaleev Oct 20, 2022
775a5db
Partial implementation of ttg::make_device_tt
devreal Oct 20, 2022
7d9ed91
Merge branch 'master' into ttg-device-support-master
evaleev Oct 25, 2022
aa77974
fixup span.h for when using c++20
evaleev Oct 25, 2022
a24eadc
make device_mock compile again, and no need for MAWworld for no reason
evaleev Oct 26, 2022
5e49bd2
Encapsulate callables passed to make_device_tt mock in a regular task
devreal Oct 26, 2022
efaa252
Use the new multiindex key type in device mock example
devreal Oct 26, 2022
ed01b32
Remove superfluous todos
devreal Oct 26, 2022
097d653
Provide a scope for views and replace ttg::span with ttg::ViewSpan
devreal Oct 26, 2022
9a6251b
Add missing view include in madness backend
devreal Oct 26, 2022
339f296
Rename CUDA precompile guards:
devreal Oct 26, 2022
2100f17
Remove noexcept from from default View ctor
devreal Oct 26, 2022
8e6b6ff
Add missing terminal name in mock device example
devreal Oct 26, 2022
8d19b20
Add a fence to the mock device test to make the termdet happy
devreal Oct 27, 2022
0fac7e5
Add iovec.h to list of installed files.
devreal Oct 27, 2022
293fe68
slight reorg of contrib dox + added device design notes
evaleev Oct 27, 2022
1fda791
updated device design notes to point out the need for Views in both U…
evaleev Oct 27, 2022
781c5f5
make TTG compilable with C++20
evaleev Oct 28, 2022
0b1f136
avoid infinite recursion in ttg::{set_size,finalize}<i> that do not t…
evaleev Oct 28, 2022
75a2fce
ttg_parsec::TT::static_op{,_noarg} return parsec_hook_return_t in pre…
evaleev Oct 31, 2022
ca4ab38
cleanup
evaleev Oct 31, 2022
a5ae409
find <coroutine>
evaleev Oct 31, 2022
0da8a01
added an example of a task body being a (trivial) coroutine
evaleev Oct 31, 2022
35277bc
[ci] try using gcc-10, first to provide support C++ corotuines, for…
evaleev Oct 31, 2022
9f6f581
[ci] try dumping CMake{Output,Error}.log if cmake fails
evaleev Oct 31, 2022
199ef88
coroutines are optional, but CI will try to use them
evaleev Oct 31, 2022
acdde42
bump BTAS tag to support gcc 10 with -std=c++20, it seemingly provide…
evaleev Oct 31, 2022
83839fe
gcc-12 does not seem to like co_return in a function returning void
evaleev Oct 31, 2022
2084d4a
updated design notes w/ tentative coroutine-based sketch
evaleev Oct 31, 2022
4f9ef86
started sketching out resumable_task
evaleev Oct 31, 2022
35c333a
resumable_task is starting to come together, trivial co_await works
evaleev Nov 1, 2022
ebfe2be
moar resumable_task ... final_suspend always suspends to avoid coros …
evaleev Nov 1, 2022
0f67a99
implemented introspection of return type of generic/non-generic calla…
evaleev Nov 2, 2022
3f8c6a7
fixup
evaleev Nov 2, 2022
2331f57
make_tt extracts return type name from the callable
evaleev Nov 2, 2022
5ea00ac
return type propagated further up the call stack to allow proper supp…
evaleev Nov 2, 2022
cc2971d
ttg_parsec::TT::static_op now receives nonnull ptr to the coroutine s…
evaleev Nov 2, 2022
e39e25d
sketch out resuming suspended task in the parsec backend
evaleev Nov 2, 2022
33b7d67
parsec reruns suspended tasks successfully
evaleev Nov 3, 2022
6ac6d02
cleanup + updated design notes
evaleev Nov 3, 2022
84205cd
cleanup + annotation of of the coroutine classes + cleanup of the PaR…
evaleev Nov 4, 2022
41c79df
parsec's TT::static_op_noarg now is also coroutine aware
evaleev Nov 4, 2022
ac475f3
adapted madness backend to do same (incomplete) handling of coroutine…
evaleev Nov 4, 2022
e6a1a0a
fixups to make build with C++17 again
evaleev Nov 4, 2022
d3769bf
[cmake] fixup
evaleev Nov 4, 2022
a9a1a55
[cmake] bump MAD tag to reduce noise when compiling with C++20 (see h…
evaleev Nov 4, 2022
482ee2f
replaced more std::abort instances with ttg::abort
evaleev Nov 8, 2022
583a912
make MultiIndex mad/boost-serializable
evaleev Nov 8, 2022
3c9c029
[ci] C compiler matches C++ compiler
evaleev Nov 8, 2022
df75b3e
[cmake] discover std::coroutine is needed
evaleev Nov 8, 2022
0a027fe
[cmake] install public headers generated in the build tree correctly
evaleev Nov 8, 2022
bdcb6f8
Merge branch 'master' into ttg-device-support-master
evaleev Nov 8, 2022
2f68385
[ci] dump CMake{Output,Error}.log of install tree tests to CI log
evaleev Nov 8, 2022
458132e
[cmake] when checking for std coroutine header try without and with -…
evaleev Nov 8, 2022
7a3fba8
[cmake] when compiling std coroutine example try without and with -st…
evaleev Nov 9, 2022
82b9a0f
[cmake] do not do separate header and compile checks for coroutine do…
evaleev Nov 9, 2022
f6d80e8
Merge pull request #4 from TESSEorg/ttg-device-support-coro
devreal Nov 10, 2022
c2b590b
[cmake] bump PaRSEC tag to pull in https://github.com/TESSEorg/parsec…
evaleev Nov 12, 2022
e835805
Remove device_mock from test executables
devreal Jan 10, 2023
cb1ad14
Initial implementation of coroutine-based device support with PaRSEC
devreal Jan 24, 2023
0897f9c
Compiler fixes
devreal Jan 25, 2023
945595e
Add device_coro.cc test file
devreal Jan 25, 2023
7dfe4ea
Switch to a Thomas' branch that is close to PaRSEC master
devreal Jan 25, 2023
c203dac
Revert "Switch to a Thomas' branch that is close to PaRSEC master"
devreal Jan 26, 2023
987e98c
Some more device coroutine examples
devreal Jan 27, 2023
f3544fb
Base of the beginning to log the appropriate info from the profiling
therault Nov 16, 2022
7ab4a1e
Update to appropriate version of parsec; use arrays of chars to store…
therault Nov 19, 2022
ce71227
Up to latest parsec version
therault Nov 21, 2022
5cf5388
Update to latest parsec version
therault Nov 29, 2022
58603aa
Porting over PaRSEC master: addto_nb_pa has been renamed and tasks de…
therault Jan 3, 2023
a7388f4
Point to the branch of PaRSEC master that has all needed features
therault Jan 3, 2023
6292ab5
Port deprecated types and functions to parsec master
therault Jan 3, 2023
6eaa97d
Port the PaRSEC backend over a candidate PaRSEC master
therault Jan 5, 2023
ce07798
Use Thomas's github for the patched parsec branch
devreal Jan 27, 2023
62c1113
Make device coro tasks actually compile
devreal Jan 27, 2023
45183ce
Many fixes to coro-based device tasks
devreal Feb 1, 2023
a51b130
Clean up code from ttg::meta::is_detected debugging
devreal Feb 3, 2023
9d3d975
Clean up code from ttg::meta::is_detected debugging
devreal Feb 3, 2023
522967a
Implement ttg::buffer and ttg::devicescratch in the PaRSEC backend
devreal Feb 27, 2023
98a7a89
Support for moving between device and host tasks, much more
devreal Mar 3, 2023
e07ebe5
get_ptr is not an awaitable operation
devreal Mar 3, 2023
2a0e47f
Extend CUDA test and add support for sending objects containing a buffer
devreal Mar 9, 2023
de259c2
Fix msg header ctor and non-device tasks
devreal Mar 9, 2023
7a08f07
Expose a backend allocator for the devices
therault Mar 8, 2023
63b889c
Draft for sending out of a device task
devreal Mar 15, 2023
1bb638f
Expose a backend allocator for the devices
therault Mar 8, 2023
035406e
conflict during merge
therault Mar 30, 2023
ab8184f
Fix conflict during pull
therault Mar 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
os : [ macos-latest, ubuntu-20.04 ]
include:
- os: ubuntu-20.04
cxx: /usr/bin/g++-9
cc: /usr/bin/gcc-10
cxx: /usr/bin/g++-10
- os: macos-latest
cc: clang
cxx: clang++

name: "${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }}"
Expand All @@ -36,6 +38,7 @@ jobs:
-DMPIEXEC_PREFLAGS='--bind-to;none;--allow-run-as-root'
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install
-DTTG_EXAMPLES=ON
-DCMAKE_CXX_STANDARD=20

steps:
- uses: actions/checkout@v2
Expand All @@ -50,7 +53,7 @@ jobs:
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
sudo apt-get update
sudo apt-get -y install ninja-build g++-9 liblapack-dev libboost-dev libboost-serialization-dev libeigen3-dev openmpi-bin libopenmpi-dev libtbb-dev ccache flex bison cmake
sudo apt-get -y install ninja-build g++-10 liblapack-dev libboost-dev libboost-serialization-dev libeigen3-dev openmpi-bin libopenmpi-dev libtbb-dev ccache flex bison cmake

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down Expand Up @@ -99,7 +102,8 @@ jobs:
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_CONFIG
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_CONFIG || (cat CMakeFiles/CMakeOutput.log && cat CMakeFiles/CMakeError.log)

- name: Build
working-directory: ${{github.workspace}}/build
Expand All @@ -124,7 +128,7 @@ jobs:
working-directory: ${{github.workspace}}/build
shell: bash
run: |
cmake -S $GITHUB_WORKSPACE/doc/dox/dev/devsamp/main -B test_install_devsamp -DCMAKE_PREFIX_PATH=${{github.workspace}}/install
cmake -S $GITHUB_WORKSPACE/doc/dox/dev/devsamp/main -B test_install_devsamp -DCMAKE_PREFIX_PATH=${{github.workspace}}/install || (cat test_install_devsamp/CMakeFiles/CMakeOutput.log && cat test_install_devsamp/CMakeFiles/CMakeError.log)
cmake --build test_install_devsamp
cmake -E make_directory test_install_userexamples
cat > test_install_userexamples/CMakeLists.txt <<EOF
Expand All @@ -136,7 +140,7 @@ jobs:
add_ttg_executable(iterative $GITHUB_WORKSPACE/doc/dox/user/examples/iterative.cc NOT_EXCLUDE_FROM_ALL)
add_ttg_executable(distributed $GITHUB_WORKSPACE/doc/dox/user/examples/distributed.cc NOT_EXCLUDE_FROM_ALL)
EOF
cmake -S test_install_userexamples -B test_install_userexamples/build -DCMAKE_PREFIX_PATH=${{github.workspace}}/install
cmake -S test_install_userexamples -B test_install_userexamples/build -DCMAKE_PREFIX_PATH=${{github.workspace}}/install || (cat test_install_userexamples/CMakeFiles/CMakeOutput.log && cat test_install_userexamples/CMakeFiles/CMakeError.log)
cmake --build test_install_userexamples/build

- name: Build+Deploy Dox
Expand Down
30 changes: 29 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ project(ttg
LANGUAGES CXX
HOMEPAGE_URL "https://tesseorg.github.io/ttg/")

set(CMAKE_CXX_EXTENSIONS OFF)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD "20" CACHE STRING "The C++ standard")
endif()
if (NOT CMAKE_CXX_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "The C++ standard extensions allowed?")
endif()

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules/")
include(GNUInstallDirs)
Expand Down Expand Up @@ -78,6 +83,28 @@ endif (BUILD_TESTING)
include(FindOrFetchBoost)
# Cereal
#include(FindOrFetchCereal)
# C++ coroutines
find_package(CXXStdCoroutine MODULE REQUIRED COMPONENTS Final Experimental)

##########################
#### CUDA -- CUDA language must be added before PaRSEC detects CUDA
##########################
option(TTG_DISABLE_CUDA "True iff support for CUDA files is disabled, even if it is possible" OFF)
if( NOT TTG_DISABLE_CUDA )
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
enable_language(CUDA)
endif(CMAKE_CUDA_COMPILER)
set(TTG_HAVE_CUDA ${CMAKE_CUDA_COMPILER} CACHE BOOL "True if TTG supports compiling .cu files")
find_package(CUDAToolkit)
if (TARGET CUDA::cudart)
set(TTG_HAVE_CUDART True CACHE BOOL "True support for CUDART was found.")
endif(TARGET CUDA::cudart)
else( NOT TTG_DISABLE_CUDA )
set(TTG_HAVE_CUDA OFF CACHE BOOL "Support for CUDA was disabled")
set(TTG_HAVE_CUDART OFF CACHE BOOL "Support for CUDA was disabled")
endif( NOT TTG_DISABLE_CUDA )

##########################
#### prerequisite runtimes
Expand Down Expand Up @@ -154,6 +181,7 @@ configure_package_config_file(cmake/ttg-config.cmake.in
install(FILES
"${PROJECT_SOURCE_DIR}/cmake/modules/AddTTGExecutable.cmake"
"${PROJECT_SOURCE_DIR}/cmake/modules/AddTTGTestExecutable.cmake"
"${PROJECT_SOURCE_DIR}/cmake/modules/FindCXXStdCoroutine.cmake"
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}/modules"
COMPONENT ttg-config)

Expand Down
9 changes: 9 additions & 0 deletions cmake/modules/AddCUDAToolkit.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
find_package(CUDAToolkit)
set(TTG_HAVE_CUDA ${CUDAToolkit_FOUND} CACHE BOOL "True if TTG supports CUDA")
if (TTG_HAVE_CUDA)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
enable_language(CUDA)
endif(CMAKE_CUDA_COMPILER)
set(TTG_HAVE_CU_COMPILER ${CMAKE_CUDA_COMPILER} CACHE BOOL "True if TTG supports compiling .cu files")
endif(TTG_HAVE_CUDA)
9 changes: 8 additions & 1 deletion cmake/modules/AddTTGLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ macro(add_ttg_library)
# set_target_properties(${_library} PROPERTIES PUBLIC_HEADER "${ADD_TTG_LIBRARY_PUBLIC_HEADER}")
# install manually
foreach ( file ${ADD_TTG_LIBRARY_PUBLIC_HEADER} )
file(RELATIVE_PATH _rel_file_path "${PROJECT_SOURCE_DIR}/ttg" "${file}")
# N.B. some files are in the build tree
if ("${file}" MATCHES "^${PROJECT_SOURCE_DIR}/ttg")
file(RELATIVE_PATH _rel_file_path "${PROJECT_SOURCE_DIR}/ttg" "${file}")
elseif("${file}" MATCHES "^${PROJECT_BINARY_DIR}/ttg")
file(RELATIVE_PATH _rel_file_path "${PROJECT_BINARY_DIR}/ttg" "${file}")
else()
message(FATAL_ERROR "AddTTGLibrary: could not deduce install location for public header ${file} of component ${_library}")
endif()
get_filename_component( dir "${_rel_file_path}" DIRECTORY )
install( FILES ${file} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${dir}" COMPONENT ${_library})
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/ExternalDependenciesVersions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ set(TTG_TRACKED_BOOST_VERSION 1.66)
set(TTG_TRACKED_CATCH2_VERSION 2.13.1)
set(TTG_TRACKED_CEREAL_VERSION 1.3.0)
set(TTG_TRACKED_MADNESS_TAG 687ac4f5308c82de04ea0f803f57417fa92713d5)
set(TTG_TRACKED_PARSEC_TAG cb9322046c1f856fbca5804a9f96b83bbe2e676b)
set(TTG_TRACKED_PARSEC_TAG 304e6f9d092e84fe58e6c7a8ea9d4e8b14794e5e)
set(TTG_TRACKED_BTAS_TAG ab866a760b72ff23053266bf46b87f19d3df44b7)
195 changes: 195 additions & 0 deletions cmake/modules/FindCXXStdCoroutine.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

# This is copied from:
# https://github.com/vector-of-bool/CMakeCM/blob/master/modules/FindFilesystem.cmake

#[=======================================================================[.rst:

FindCXXStdCoroutine
##############

This module supports the C++20 standard library's coroutine utilities. Link your target to the
:imp-target:`std::coroutine` imported target to provide standard C++ coroutine API.

Options
*******

The ``COMPONENTS`` argument to this module supports the following values:

.. find-component:: Experimental
:name: coro.Experimental

Allows the module to find the "experimental" version of the
Coroutine library. This is the library that should be used with the
``std::experimental::coroutine`` namespace.

.. find-component:: Final
:name: coro.Final

Finds the final C++20 standard version of the coroutine library.

If no components are provided, behaves as if the
:find-component:`coro.Final` component was specified.

If both :find-component:`coro.Experimental` and :find-component:`coro.Final` are
provided, first looks for ``Final``, and falls back to ``Experimental`` in case
of failure. If ``Final`` is found, :imp-target:`std::coroutine` and all
:ref:`variables <coro.variables>` will refer to the ``Final`` version.


Imported Targets
****************

.. imp-target:: std::coroutine

The ``std::coroutine`` imported target is defined when any requested
version of the C++ coroutine library has been found, whether it is
*Experimental* or *Final*.

If no version of the coroutine library is available, this target will not
be defined.

.. note::
This target has ``cxx_std_20`` as an ``INTERFACE``
:ref:`compile language standard feature <req-lang-standards>`. Linking
to this target will automatically enable C++20 if no later standard
version is already required on the linking target.


.. coro.variables:

Variables
*********

.. variable:: CXX_COROUTINE_COMPONENT

Set to ``Final`` when the :find-component:`coro.Final` version of C++
coroutine library was found, ``Experimental`` when
the :find-component:`coro.Experimental` version of C++
coroutine library was found, otherwise not defined.

.. variable:: CXX_COROUTINE_HAVE_CORO

Set to ``TRUE`` when a coroutine header was found.

.. variable:: CXX_COROUTINE_HEADER

Set to either ``coroutine`` or ``experimental/coroutine`` depending on
whether :find-component:`coro.Final` or :find-component:`coro.Experimental` was
found.

.. variable:: CXX_COROUTINE_NAMESPACE

Set to either ``std::coroutine`` or ``std::experimental::coroutine``
depending on whether :find-component:`coro.Final` or
:find-component:`coro.Experimental` was found.


Examples
********

Using `find_package(Coroutine)` with no component arguments:

.. code-block:: cmake

find_package(Coroutine REQUIRED)

add_executable(my-program main.cpp)
target_link_libraries(my-program PRIVATE std::coroutine)


#]=======================================================================]


if(TARGET std::coroutine)
# This module has already been processed. Don't do it again.
return()
endif()

include(CMakePushCheckState)
include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)

cmake_push_check_state()

set(CMAKE_REQUIRED_QUIET ${CXXStdCoroutine_FIND_QUIETLY})

# Normalize and check the component list we were given
set(CXXStdCoroutines_want_components ${CXXStdCoroutine_FIND_COMPONENTS})
if(CXXStdCoroutine_FIND_COMPONENTS STREQUAL "")
set(CXXStdCoroutines_want_components Final)
endif()

# Warn on any unrecognized components
set(CXXStdCoroutines_extra_components ${CXXStdCoroutines_want_components})
list(REMOVE_ITEM CXXStdCoroutines_extra_components Final Experimental)
foreach(component IN LISTS CXXStdCoroutines_extra_components)
message(WARNING "Extraneous find_package component for CXXStdCoroutine: ${component}")
endforeach()

# clang may need to use -stdlib=c++ to have coroutines
# gcc/libstdc++ needs -fcoroutines
set(CXXStdCoroutines_find_options "" "-stdlib=libc++" "-fcoroutines")
set(CXXStdCoroutines_std_options "" "-std=c++20" "-std=c++2a")
set(CXXStdCoroutines_want_components_ordered "${CXXStdCoroutines_want_components}")
list(SORT CXXStdCoroutines_want_components_ordered ORDER DESCENDING) # Final before Experimental

foreach(component IN LISTS CXXStdCoroutines_want_components_ordered)
if(component STREQUAL "Final")
set(_coro_header coroutine)
set(_coro_namespace std)
else()
set(_coro_header experimental/coroutine)
set(_coro_namespace std::experimental)
endif()
foreach(option IN LISTS CXXStdCoroutines_find_options)
foreach(stdoption IN LISTS CXXStdCoroutines_std_options)
cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${option} ${stdoption}")

string(CONFIGURE [[
#include <@_coro_header@>

int main() {
auto x = @_coro_namespace@::suspend_always{};
return 0;
}
]] code @ONLY)

check_cxx_source_compiles("${code}" HAVE_USABLE_${_coro_header})
mark_as_advanced(HAVE_USABLE_${_coro_header})
cmake_pop_check_state()
if(HAVE_USABLE_${_coro_header})
add_library(std::coroutine INTERFACE IMPORTED GLOBAL)
target_compile_features(std::coroutine INTERFACE cxx_std_20)
if (option)
target_compile_options(std::coroutine INTERFACE "${option}")
endif()
set(CXX_COROUTINE_COMPONENT "${component}" CACHE STRING "The component of CXXStdCoroutine package found")
# break out of this loop
break()
else()
unset(HAVE_USABLE_${_coro_header} CACHE)
endif()
endforeach() # stdoption
if (TARGET std::coroutine)
break()
endif()
endforeach() # option
if (TARGET std::coroutine)
break()
endif()
endforeach() # components

set(CXX_COROUTINE_HAVE_CORO ${HAVE_USABLE_${_coro_header}} CACHE BOOL "TRUE if we have usable C++ coroutine headers")
set(CXX_COROUTINE_HEADER ${_coro_header} CACHE STRING "The header that should be included to obtain the coroutine APIs")
set(CXX_COROUTINE_NAMESPACE ${_coro_namespace} CACHE STRING "The C++ namespace that contains the coroutine APIs")

cmake_pop_check_state()

set(CXXStdCoroutine_FOUND ${HAVE_USABLE_${_coro_header}} CACHE BOOL "TRUE if we have usable C++ coroutine headers" FORCE)

if(CXXStdCoroutine_FIND_REQUIRED AND NOT TARGET std::coroutine)
message(FATAL_ERROR "Cannot discover std::coroutine headers and/or compile simple program using std::coroutine")
endif()
9 changes: 3 additions & 6 deletions cmake/modules/FindCXXStdExecution.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
FindCXXStdExecution
##############

This module supports the C++17 standard library's execution utilities. Use the
:imp-target:`std::execution` imported target to
This module supports the C++17 standard library's execution utilities. Link your target to the
:imp-target:`std::execution` imported target to provide standard C++ execution API.

Imported Targets
****************
Expand Down Expand Up @@ -69,9 +69,6 @@ cmake_push_check_state()

set(CMAKE_REQUIRED_QUIET ${CXXStdExecution_FIND_QUIETLY})

# All of our tests required C++17 or later
set(CMAKE_CXX_STANDARD 17)

set(CXXStdExecution_FOUND FALSE)

# We have execution header, but how do we use it? Do link checks
Expand All @@ -87,7 +84,7 @@ string(CONFIGURE [[
}
]] code @ONLY)

# Try to compile a simple filesystem program without any linker flags
# Try to compile a simple execution program without any linker flags
check_cxx_source_compiles("${code}" CXX_EXECUTION_NO_LINK_NEEDED)

set(CXXStdExecution_CAN_LINK ${CXX_EXECUTION_NO_LINK_NEEDED})
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindOrFetchPARSEC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (NOT TARGET PaRSEC::parsec)

FetchContent_Declare(
PARSEC
GIT_REPOSITORY https://github.com/TESSEOrg/parsec.git
GIT_REPOSITORY https://github.com/therault/parsec.git
GIT_TAG ${TTG_TRACKED_PARSEC_TAG}
)
FetchContent_MakeAvailable(PARSEC)
Expand Down
Loading