-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
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 NotNullConan(ConanFile):
# Package Info
name = "NotNull"
version = "0.0.1"
description = " A wrapper type to prevent nullability"
url = "https://github.com/bitwizeshift/not_null"
author = "Matthew Rodusek <matthew.rodusek@gmail.com>"
license = "MIT"
# Sources
exports = ( "LICENSE" )
exports_sources = ( "CMakeLists.txt",
"cmake/*",
"include/*",
"test/*",
"LICENSE")
# Settings
options = {}
default_options = {}
generators = "cmake"
# Dependencies
build_requires = ("Catch2/2.7.1@catchorg/stable")
def package(self):
cmake = CMake(self)
cmake.definitions["NOT_NULL_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()