forked from NVIDIA/stdexec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
35 lines (29 loc) · 1.24 KB
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from conans import ConanFile, CMake, tools
import requests
import re
from os import path
class P2300Recipe(ConanFile):
name = "P2300"
description = "std::execution"
author = "Michał Dominiak, Lewis Baker, Lee Howes, Kirk Shoop, Michael Garland, Eric Niebler, Bryce Adelstein Lelbach"
topics = ("WG21", "concurrency")
homepage = "https://github.com/NVIDIA/stdexec"
url = "https://github.com/NVIDIA/stdexec"
license = "Apache 2.0"
settings = "compiler" # Header only - compiler only used for flags
tool_requires = "catch2/2.13.6"
exports_sources = "include/*"
generators = "cmake_find_package"
def validate(self):
tools.check_min_cppstd(self,"20")
def set_version(self):
# Get the version from the spec file
response = requests.get("https://raw.githubusercontent.com/brycelelbach/wg21_p2300_execution/main/execution.bs")
rev = re.search(r"Revision: (\d+)", response.text).group(1).strip()
self.version = f"0.{rev}.0"
def package(self):
self.copy("*.hpp")
def package_info(self):
# Make sure to add the correct flags for gcc
if self.settings.compiler == "gcc":
self.cpp_info.cxxflags = ["-fcoroutines", "-Wno-non-template-friend"]