-
Notifications
You must be signed in to change notification settings - Fork 6
/
conanfile.py
34 lines (28 loc) · 869 Bytes
/
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
from conans import ConanFile, CMake
class CalculateConan(ConanFile):
name = 'Calculate'
version = '2.1.1'
license = 'MIT'
url = 'https://github.com/newlawrence/Calculate.git'
description = 'Math Expressions Parser Engine'
generators = 'cmake'
exports_sources = [
'copying',
'CMakeLists.txt',
'cmake/CalculateConfig.cmake.in',
'include/*',
'test/*'
]
def build_requirements(self):
self.build_requires('Catch2/2.9.1@catchorg/stable')
def build(self):
cmake = CMake(self)
cmake.definitions['CALCULATE_BUILD_TESTS'] = 'ON'
cmake.configure()
cmake.build(['--target', 'make_test'])
cmake.test()
def package(self):
self.copy('*.hpp')
self.copy('copying', dst='.')
def package_id(self):
self.info.header_only()