Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stdexec] new port #30031

Merged
merged 1 commit into from
Mar 13, 2023
Merged

[stdexec] new port #30031

merged 1 commit into from
Mar 13, 2023

Conversation

autoantwort
Copy link
Contributor

Fixes #29184

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@MonicaLiu0311 MonicaLiu0311 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Mar 6, 2023
@MonicaLiu0311
Copy link
Contributor

usage:

stdexec provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(stdexec CONFIG REQUIRED)
    target_link_libraries(main PRIVATE STDEXEC::stdexec)

When testing usage, the following error occurs:

>------ Build All started: Project: CMakeFindUsage, Configuration: x64-Debug ------
  MSBuild version 17.4.1+9a89d02ff for .NET Framework
    Checking Build System
    Building Custom Rule C:/Users/monica/source/repos/CMakeFindUsage/CMakeFindUsage/CMakeLists.txt
    CMakeFindUsage.cpp
C:\Users\monica\source\repos\CMakeFindUsage\CMakeFindUsage\CMakeFindUsage.cpp(2,10): fatal error C1083: Cannot open include file: 'stdexec_version_config.hpp': No such file or directory 

Build All failed.
CMakeFindUsage.cpp
#include <iostream>
#include "stdexec_version_config.hpp"
#include "stdexec/concepts.hpp"

using namespace std;

int main()
{
cout << "Hello CMake." << endl;
return 0;
}

CMakeLists.txt
cmake_minimum_required (VERSION 3.8)

set(CMAKE_TOOLCHAIN_FILE "E:/stdexec/scripts/buildsystems/vcpkg.cmake")

project ("CMakeFindUsage")

find_package(stdexec CONFIG REQUIRED)

add_executable (CMakeFindUsage "CMakeFindUsage.cpp")

target_link_libraries(CMakeFindUsage PRIVATE STDEXEC::stdexec)

@autoantwort
Copy link
Contributor Author

@MonicaLiu0311 That should be fixed now :)

@MonicaLiu0311
Copy link
Contributor

usage:

stdexec provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(stdexec CONFIG REQUIRED)
    target_link_libraries(main PRIVATE STDEXEC::stdexec)

When testing usage, the following error occurs:
(I have set CMAKE_CXX_STANDARD to 20)

>------ Build All started: Project: CMakeFindUsage, Configuration: x64-Debug ------
  MSBuild version 17.4.1+9a89d02ff for .NET Framework
    Checking Build System
    Building Custom Rule C:/Users/monica/source/repos/CMakeFindUsage/CMakeFindUsage/CMakeLists.txt
    CMakeFindUsage.cpp
E:\stdexec\installed\x64-windows\include\stdexec\__detail\__config.hpp(19,1): fatal error C1189: #error:  This library requires the use of C++20. 

Build All failed.
CMakeFindUsage.cpp
#include <iostream>
#include "stdexec_version_config.hpp"
#include "stdexec/concepts.hpp"

using namespace std;

int main()
{
cout << "Hello CMake." << endl;
return 0;
}

CMakeLists.txt
cmake_minimum_required (VERSION 3.8)

set(CMAKE_TOOLCHAIN_FILE "E:/stdexec/scripts/buildsystems/vcpkg.cmake")

set(CMAKE_CXX_STANDARD 20)

project ("CMakeFindUsage")

find_package(stdexec CONFIG REQUIRED)

add_executable (CMakeFindUsage "CMakeFindUsage.cpp")

target_link_libraries(CMakeFindUsage PRIVATE STDEXEC::stdexec)

@autoantwort
Copy link
Contributor Author

@MonicaLiu0311 Hm I tried to reproduce, but I got:

$ cmake -S . -B build 
-- Building for: Visual Studio 17 2022
-- Running vcpkg install
Detecting compiler hash for triplet x64-windows...
The following packages will be built and installed:
    stdexec[core]:x64-windows -> 2023-03-05
  * vcpkg-cmake[core]:x64-windows -> 2022-12-22
  * vcpkg-cmake-config[core]:x64-windows -> 2022-02-06#1
Additional packages (*) will be modified to complete this operation.
Restored 0 package(s) from C:\Users\LeanderSchulten\AppData\Local\vcpkg\archives in 1.104 ms. Use --debug to see more details.
Attempting to fetch 3 package(s) from HTTP servers
Restored 2 package(s) from HTTP servers in 472.3 ms. Use --debug to see more details.
Installing 1/3 vcpkg-cmake-config:x64-windows...
Elapsed time to handle vcpkg-cmake-config:x64-windows: 7.948 ms
Installing 2/3 vcpkg-cmake:x64-windows...
Elapsed time to handle vcpkg-cmake:x64-windows: 8.969 ms
Installing 3/3 stdexec:x64-windows...
Building stdexec[core]:x64-windows...
-- Downloading https://github.com/NVIDIA/stdexec/archive/6247237ca9e061401f90a8d320bfe33a61d69a31.tar.gz -> NVIDIA-stdexec-6247237ca9e061401f90a8d320bfe33a61d69a31.tar.gz...
-- Extracting source C:/Users/LeanderSchulten/git_projects/vcpkg/downloads/NVIDIA-stdexec-6247237ca9e061401f90a8d320bfe33a61d69a31.tar.gz
-- Applying patch fix-include-location.patch
-- Using source at C:/Users/LeanderSchulten/git_projects/vcpkg/buildtrees/stdexec/src/3a61d69a31-f293c6108a.clean
-- Downloading https://github.com/rapidsai/rapids-cmake/archive/c7a28304639a2ed460181b4753f3280c7833c718.tar.gz -> rapidsai-rapids-cmake-c7a28304639a2ed460181b4753f3280c7833c718.tar.gz...
-- Extracting source C:/Users/LeanderSchulten/git_projects/vcpkg/downloads/rapidsai-rapids-cmake-c7a28304639a2ed460181b4753f3280c7833c718.tar.gz
-- Using source at C:/Users/LeanderSchulten/git_projects/vcpkg/buildtrees/stdexec/src/0c7833c718-60e86c7e91.clean
-- Downloading https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.02/RAPIDS.cmake -> RAPIDS.cmake...
-- Downloading https://raw.githubusercontent.com/brycelelbach/wg21_p2300_execution/main/execution.bs -> execution.bs...
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-rel
-- Installing: C:/Users/LeanderSchulten/git_projects/vcpkg/packages/stdexec_x64-windows/share/stdexec/copyright
-- Performing post-build validation
Uploaded binaries to 1 HTTP remotes.
Stored binary cache: "C:\Users\LeanderSchulten\AppData\Local\vcpkg\archives\b1\b145c28317d93990b34f961915b7d2b9b376d5cd05f7226de9f626131cbbe763.zip"
Elapsed time to handle stdexec:x64-windows: 4.079 s
Total install time: 4.57 s
stdexec provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(stdexec CONFIG REQUIRED)
    target_link_libraries(main PRIVATE STDEXEC::stdexec)

-- Running vcpkg install - done
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.34.31937.0
-- The CXX compiler identification is MSVC 19.34.31937.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE  
-- Found stdexec: C:/Users/LeanderSchulten/git_projects/vcpkg/test/build/vcpkg_installed/x64-windows/share/stdexec/stdexec-config.cmake (found version "0.7.0")
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/LeanderSchulten/git_projects/vcpkg/test/build

$ cmake --build build 
MSBuild version 17.4.1+9a89d02ff for .NET Framework
  Checking Build System
  Building Custom Rule C:/Users/LeanderSchulten/git_projects/vcpkg/test/CMakeLists.txt
  CMakeFindUsage.cpp
  CMakeFindUsage.vcxproj -> C:\Users\LeanderSchulten\git_projects\vcpkg\test\build\Debug\CMakeFindUsage.exe
  Building Custom Rule C:/Users/LeanderSchulten/git_projects/vcpkg/test/CMakeLists.txt

$ ./build/Debug/CMakeFindUsage.exe 
Hello CMake.

@MonicaLiu0311 MonicaLiu0311 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Mar 10, 2023
@dan-shaw dan-shaw merged commit e741c6e into microsoft:master Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New Port Request] stdexec
3 participants