Skip to content

Commit

Permalink
scc: add v2023.06
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 2, 2023
1 parent 00ae3f0 commit 55f9a2a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
7 changes: 7 additions & 0 deletions recipes/scc/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
sources:
"2023.06":
url: "https://github.com/Minres/SystemC-Components/releases/download/2023.06/SCC-2023.06-full.tar.gz"
sha256: "6d1a842f474daa512030d61526e83182f9289b977a3a7cb88ed151050c33c4e9"
"2022.08":
url: "https://github.com/Minres/SystemC-Components/releases/download/2022.08/systemc-components.tar.gz"
sha256: "825dfc38e7b00df34330f01ba38f5913e1a88c5002344e433b972faf0e6c4501"
patches:
"2023.06":
- patch_file: "patches/2023.06-fix-conan-targets.patch"
patch_description: "add find_package()-s and disable automatic Conan setup"
patch_type: "conan"
"2022.08":
- patch_file: "patches/2022.08-fix-conan-targets.patch"
patch_description: "add find_package()-s and disable automatic Conan setup"
Expand Down
10 changes: 7 additions & 3 deletions recipes/scc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
self.requires("fmt/10.1.1")
self.requires("fmt/8.1.1")
self.requires("zlib/1.2.13")
self.requires("boost/1.83.0")
self.requires("gsl-lite/0.41.0")
self.requires("spdlog/1.12.0")
self.requires("systemc/2.3.4")
if Version(self.version) >= "2023.06":
self.requires("yaml-cpp/0.8.0")

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
Expand All @@ -80,8 +82,10 @@ def generate(self):
if self.settings.os == "Windows":
tc.variables["SCC_LIMIT_TRACE_TYPE_LIST"] = True
tc.generate()
tc = CMakeDeps(self)
tc.generate()
deps = CMakeDeps(self)
deps.set_property("systemc", "cmake_file_name", "SystemC")
deps.set_property("yaml-cpp", "cmake_target_name", "yaml-cpp::yaml-cpp")
deps.generate()

def build(self):
apply_conandata_patches(self)
Expand Down
2 changes: 1 addition & 1 deletion recipes/scc/all/patches/2022.08-fix-conan-targets.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
+find_package(fmt REQUIRED CONFIG)
+find_package(spdlog REQUIRED CONFIG)
+find_package(Boost REQUIRED CONFIG)
+find_package(systemc REQUIRED CONFIG)
+find_package(SystemC REQUIRED CONFIG)
+if(TRUE)
+elseif(CMAKE_PROJECT_NAME STREQUAL "scc")
message(STATUS "Building SCC in standalone mode")
Expand Down
15 changes: 15 additions & 0 deletions recipes/scc/all/patches/2023.06-fix-conan-targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -24,5 +24,11 @@
include(Common)

-if(CMAKE_PROJECT_NAME STREQUAL "scc")
+find_package(fmt REQUIRED CONFIG)
+find_package(spdlog REQUIRED CONFIG)
+find_package(Boost REQUIRED CONFIG)
+find_package(SystemC REQUIRED CONFIG)
+find_package(yaml-cpp REQUIRED CONFIG)
+if(TRUE)
+elseif(CMAKE_PROJECT_NAME STREQUAL "scc")
message(STATUS "Building SCC in standalone mode")
include(GNUInstallDirs)
4 changes: 3 additions & 1 deletion recipes/scc/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"2023.06":
folder: all
"2022.08":
folder: "all"
folder: all

0 comments on commit 55f9a2a

Please sign in to comment.