-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
37 lines (30 loc) · 1.55 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
from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.errors import ConanInvalidConfiguration
import os
class WallGoCollisionRecipe(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeToolchain", "CMakeDeps"
def requirements(self):
self.requires("gsl/2.7.1")
self.requires("hdf5/1.14.3")
self.requires("pybind11/2.11.1")
self.requires("muparser/2.3.4")
"""Require llvm-openmp recipe if env variable is set.
This version of OMP doesn't seem to work universally with our lib, so keep the option to use hidden.
"""
ompEnvVar = os.getenv("WALLGO_USE_CONAN_OMP", "0")
if ompEnvVar != "0":
# llvm-openmp requires compiler.cppstd>=17
if self.settings.compiler.cppstd:
try:
check_min_cppstd(self, 17)
self.requires("llvm-openmp/18.1.8")
except ConanInvalidConfiguration as e:
raise RuntimeError("\n\n!! Error from WallGoCollision !!\n"
"You have set the 'WALLGO_USE_CONAN_OMP' environment variable which downloads and compiles OpenMP through Conan. "
"This option requires compiler.cppstd >= 17 in your Conan 'default' profile. Please modify your profile accordingly, "
"or set the environment variable to 0 or undefine it.\n\n"
)
def build_requirements(self):
self.tool_requires("cmake/[>=3.18]")