-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconanfile.py
37 lines (31 loc) · 1.1 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
36
37
# coding=utf8
from conans import ConanFile, CMake
import tempfile
class Pipeable(ConanFile):
name = "pipeable"
version = "0.2"
description = \
"Enables easy chaining of callable objects, automatically forwarding output as input: \n" \
"auto result = vector{1, 2, 3} >>= for_each >>= int_to_cat >>= cat_to_hat;"
author = "Fred Helmesjö <[email protected]>"
url = "https://github.com/helmesjo/pipeable.git"
license = "MIT"
exports_sources = "*", "!build", "LICENSE", "README.*"
settings = "os", "arch", "compiler", "build_type"
options = {
"build_tests": [True, False]
}
default_options = {
"build_tests": True
}
def build(self):
cmake = CMake(self, set_cmake_flags=True)
cmake.definitions["PIPEABLE_BUILD_TESTS"] = self.options.build_tests
cmake.configure(build_dir="build")
cmake.build(build_dir="build")
if self.options.build_tests:
cmake.test(build_dir="build")
def package(self):
self.copy("include/*.hpp")
def package_id(self):
self.info.header_only()