You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider reducing hard CPM dependency to ease packaging #2149
Currently, CMakeLists.txt and the cmake modules have a heavy reliance on CPM (via rapids-cmake) for dependency management. While this works well for standalone development, it creates significant friction for package managers like vcpkg and Conan, which need to supply dependencies from their own registries instead. Maintainers must patch the CMake files to bypass CPM, increasing maintenance burden.
Happy to help with a PR if this direction is welcomed.
+1 from the Spack package manager side. Now that we're seeing other things like HPX 2.x creating dependencies on this there will be increased interest and more patching needed. I've seen cpm being used and failing various use cases in Legion/Realm, so we eventually added the necessary fallbacks to support other packaging efforts. @junghans@hkaiser FYI
As stdexec is header-only, and all dependencies are used for testing only a simple_install.sh as below should do the same as the cmake --install:
#! /bin/sh -e
[ -d"$1" ] || { echo"First argument should be a directory";exit 1; }
# exclude asio sub directory
find include/exec -path "include/exec/asio" -prune -o -type f -exec install -D -m 0644 {} "$1"/{} \;
find include/stdexec -type f -exec install -D -m 0644 {} "$1"/{} \;
cat <<EOF > "$1"/include/stdexec_version_config.hpp/* * Copyright (c) 2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */#pragma once#define STDEXEC_VERSION_MAJOR 0#define STDEXEC_VERSION_MINOR 11#define STDEXEC_VERSION_PATCH 0EOF
+1 from the Conan side. I opened #2341 as a small first step. It keeps CPM and icm out of the default configure, so stdexec can be configured and installed without network access when tests and the optional integrations are off. It doesn't change how the integrations get their dependencies, which is the rest of what this issue asks for.
I also opened #2342 asking for a v0.11.0 tag, so package managers don't have to make up their own versions.
@czoido After chatting with @rbberger yesterday, we came with a similar approach (details below). #2341 is the more complete version of that, so thanks for creating the PR.
For Fedora, I got it to package, but I still need to figure out what to do with the bundled rapids-cmake though. At least one can pre-download that and then inject it with -Drapids-cmake-url=file://....
Thanks @junghans and @rbberger, good sign that we landed on the same fix! The extra conditions in #2341 are there because the ASIO, Taskflow and CUDA integrations also use CPM (rapids_cpm_find, CPMAddPackage and rapids_cpm_cccl), and rapids_cpm_init has to run before them.
For rapids-cmake, the idea for the ConanCenter recipe would be to point CMake's standard FETCHCONTENT_SOURCE_DIR_RAPIDS-CMAKE variable at an unpacked copy of the archive, in case that's easier for Fedora than a file:// URL.
@ericniebler The only leftover nitpick is that include/._clangd_helper_file is compiled for nothing.
This is not a problem most of times, however, if for whatever reason you're untar-ing this repo on MacOS (like when using a cached git-clone) the ._ file may be mistaken as AppleDouble metadata file and skipped, causing a hard compilation error due to missing files. Created a dedicate issue for this: #2345
Activity
rbberger commentedon Oct 15, 2026
+1 from the Spack package manager side. Now that we're seeing other things like HPX 2.x creating dependencies on this there will be increased interest and more patching needed. I've seen cpm being used and failing various use cases in Legion/Realm, so we eventually added the necessary fallbacks to support other packaging efforts. @junghans @hkaiser FYI
junghans commentedon Oct 15, 2026
+1 for Fedora packaging.
junghans commentedon Oct 15, 2026
As
stdexecis header-only, and all dependencies are used for testing only asimple_install.shas below should do the same as thecmake --install:No testing, of course.
czoido commentedon Oct 16, 2026
+1 from the Conan side. I opened #2341 as a small first step. It keeps CPM and icm out of the default configure, so stdexec can be configured and installed without network access when tests and the optional integrations are off. It doesn't change how the integrations get their dependencies, which is the rest of what this issue asks for.
I also opened #2342 asking for a
v0.11.0tag, so package managers don't have to make up their own versions.junghans commentedon Oct 16, 2026
@czoido After chatting with @rbberger yesterday, we came with a similar approach (details below). #2341 is the more complete version of that, so thanks for creating the PR.
For Fedora, I got it to package, but I still need to figure out what to do with the bundled
rapids-cmakethough. At least one can pre-download that and then inject it with-Drapids-cmake-url=file://....Details
```diff --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,10 +105,10 @@ endif() # ############################################################################## # * Dependencies -------------------------------------------------------------+if(STDEXEC_BUILD_TESTS)
Initialize CPM
rapids_cpm_init(OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/versions.json)
-if(STDEXEC_BUILD_TESTS)
Add Catch2
set(Catch2_VERSION 3.14.0)
Always download it, don't attempt to do
find_package(Catch2)first@@ -126,7 +126,6 @@ if(STDEXEC_BUILD_TESTS)
OPTIONS
"CMAKE_CXX_STANDARD 20"
"CATCH_CONFIG_NO_POSIX_SIGNALS ON")
-endif()
Add ICM
set(icm_VERSION 1.5.0)
@@ -151,6 +150,7 @@ rapids_cpm_find(
git
apply
${CMAKE_CURRENT_LIST_DIR}/cmake/cpm/patches/icm/regex-build-error.diff)
+endif()
Ensure that we link with the threading library
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
czoido commentedon Oct 16, 2026
Thanks @junghans and @rbberger, good sign that we landed on the same fix! The extra conditions in #2341 are there because the ASIO, Taskflow and CUDA integrations also use CPM (
rapids_cpm_find,CPMAddPackageandrapids_cpm_cccl), andrapids_cpm_inithas to run before them.For rapids-cmake, the idea for the ConanCenter recipe would be to point CMake's standard
FETCHCONTENT_SOURCE_DIR_RAPIDS-CMAKEvariable at an unpacked copy of the archive, in case that's easier for Fedora than afile://URL.junghans commentedon Oct 16, 2026
I just did
which works in a network-less build as well.
rbberger commentedon Oct 17, 2026
Great progress! Thanks for getting it done.
@ericniebler The only leftover nitpick is that
include/._clangd_helper_fileis compiled for nothing.This is not a problem most of times, however, if for whatever reason you're untar-ing this repo on MacOS (like when using a cached git-clone) the
._file may be mistaken as AppleDouble metadata file and skipped, causing a hard compilation error due to missing files. Created a dedicate issue for this: #2345