-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
conanfile.py
45 lines (34 loc) · 1.08 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
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
from conans import ConanFile, CMake
class ResultConan(ConanFile):
# Package Info
name = "Result"
version = "1.0.0"
description = " A lightweight C++11-compatible error-handling mechanism"
url = "https://github.com/bitwizeshift/Result"
author = "Matthew Rodusek <[email protected]>"
license = "MIT"
# Sources
exports = ( "LICENSE" )
exports_sources = ( "CMakeLists.txt",
"cmake/*",
"include/*",
"test/*",
"LICENSE")
# Settings
options = {}
default_options = {}
generators = "cmake"
# Dependencies
build_requires = ("catch2/2.13.9")
def package(self):
cmake = CMake(self)
cmake.definitions["RESULT_COMPILE_UNIT_TESTS"] = "ON"
cmake.configure()
# Compile and run the unit tests
cmake.build()
cmake.build(target="test")
cmake.install()
self.copy(pattern="LICENSE", dst="licenses")
def package_id(self):
self.info.header_only()