Skip to content

Commit

Permalink
rdma-core: limit to Linux only
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Dec 6, 2023
1 parent fc585a5 commit 7ad7faa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion recipes/rdma-core/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re

from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import get, copy, rmdir, load, save, replace_in_file
Expand Down Expand Up @@ -55,9 +56,14 @@ def requirements(self):
if self.settings.os in ["Linux", "FreeBSD"]:
self.requires("libudev/system")

def validate(self):
if self.settings.os not in ["Linux", "FreeBSD"]:
# libnl is only available on Linux
raise ConanInvalidConfiguration("rdma-core is only supported on Linux")

def build_requirements(self):
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/2.0.3")
self.tool_requires("pkgconf/2.1.0")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down

0 comments on commit 7ad7faa

Please sign in to comment.