-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
38 lines (31 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
import os
from conan import ConanFile
from conan.tools.files import copy
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import cmake_layout, CMake
class CLCConan(ConanFile):
name = "clc"
version = "1.0.1"
settings = "os", "arch", "compiler", "build_type"
exports_sources = "*"
no_copy_source = True
generators = "CMakeToolchain", "CMakeDeps"
def validate(self):
check_min_cppstd(self, 11)
def layout(self):
cmake_layout(self)
def build(self):
if not self.conf.get("tools.build:skip_test", default=False):
cmake = CMake(self)
cmake.configure(build_script_folder=".")
# tests are compile-time
cmake.build()
def package(self):
copy(self, "*.hpp", self.source_folder, self.package_folder)
def package_info(self):
# for header-only packages, libdirs and bindirs are
# not used so it's necessary to set those as empty.
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
def package_id(self):
self.info.clear()