Skip to content

Commit

Permalink
verilator: fix SystemC GCC issue in test_package
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 1, 2023
1 parent 9b5beba commit 0879a22
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion recipes/verilator/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from conan.tools.apple import is_apple_os
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain
from conan.tools.scm import Version


class TestPackageConan(ConanFile):
Expand All @@ -26,7 +27,11 @@ def layout(self):
@property
def _with_systemc_example(self):
# systemc is not available on Macos
return not is_apple_os(self)
if is_apple_os(self):
return False
if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "6":
return False
return True

def generate(self):
tc = CMakeToolchain(self)
Expand Down
8 changes: 7 additions & 1 deletion recipes/verilator/all/test_v1_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
from conan.tools.apple import is_apple_os
from conans import ConanFile, CMake, tools
from conans.tools import Version
import os



class TestVerilatorConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package_multi"

@property
def _with_systemc_example(self):
# systemc is not available on Macos
return not is_apple_os(self)
if is_apple_os(self):
return False
if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "6":
return False
return True

def requirements(self):
if self._with_systemc_example:
Expand Down

0 comments on commit 0879a22

Please sign in to comment.