mirror of
https://github.com/Minres/conan-recipes.git
synced 2025-07-02 15:53:26 +02:00
cleans outdated recipes
This commit is contained in:
1
systemc-scv/.gitignore
vendored
Normal file
1
systemc-scv/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/scv*
|
13
systemc-scv/build.py
Executable file
13
systemc-scv/build.py
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
from cpt.packager import ConanMultiPackager
|
||||
|
||||
if __name__ == "__main__":
|
||||
builder = ConanMultiPackager()
|
||||
types = ['Debug','Release']
|
||||
for k in types:
|
||||
builder.add(
|
||||
settings={"build_type":k},
|
||||
options={"shared" : False},
|
||||
env_vars={},
|
||||
build_requires={})
|
||||
builder.run()
|
66
systemc-scv/conanfile.py
Normal file
66
systemc-scv/conanfile.py
Normal file
@ -0,0 +1,66 @@
|
||||
from conans import ConanFile, tools, AutoToolsBuildEnvironment
|
||||
import os
|
||||
|
||||
class SystemcverificationConan(ConanFile):
|
||||
name = "systemc-scv"
|
||||
version = "2.0.1"
|
||||
license = "Apache 2.0 License"
|
||||
url = "https://github.com/Minres/conan-recipes/blob/master/SystemCVerification"
|
||||
description = "The SystemC Verification (SCV) library provides a common set of APIs that are used as a basis to verification activities with SystemC"
|
||||
settings = "os", "compiler", "build_type", "arch", "cppstd"
|
||||
options = {"shared": [True, False]}
|
||||
default_options = "shared=False"
|
||||
generators = "gcc"
|
||||
source_subfolder = "scv-2.0.1"
|
||||
exports_sources = "scv-2.0.1/*"
|
||||
requires = "systemc/2.3.3"
|
||||
|
||||
def build(self):
|
||||
env_build = AutoToolsBuildEnvironment(self)
|
||||
if self.settings.cppstd == "14":
|
||||
if self.settings.compiler.libcxx == 'libstdc++11':
|
||||
env_build.cxx_flags = "-std=gnu++14 -D_GLIBCXX_USE_CXX11_ABI=1"
|
||||
else:
|
||||
env_build.cxx_flags = "-std=gnu++14 -D_GLIBCXX_USE_CXX11_ABI=0"
|
||||
elif self.settings.cppstd == "11":
|
||||
if self.settings.compiler.libcxx == 'libstdc++11':
|
||||
env_build.cxx_flags = "-std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=1"
|
||||
else:
|
||||
env_build.cxx_flags = "-std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0"
|
||||
elif self.settings.cppstd == "98":
|
||||
env_build.cxx_flags = "-std=gnu++98"
|
||||
env_build.fpic = True
|
||||
tools.mkdir("build")
|
||||
# make sure timestamps are correct to avoid invocation of autoconf tools
|
||||
tools.touch("%s/aclocal.m4" % os.path.join(self.source_folder, self.source_subfolder))
|
||||
tools.touch("%s/Makefile.in" % os.path.join(self.source_folder, self.source_subfolder))
|
||||
tools.touch("%s/configure" % os.path.join(self.source_folder, self.source_subfolder))
|
||||
env_build.libs.remove('systemc')
|
||||
with tools.chdir("build"):
|
||||
env_build.configure(
|
||||
configure_dir=os.path.join(self.source_folder, self.source_subfolder),
|
||||
args=[
|
||||
'--prefix=%s' % os.path.join(self.source_folder, 'install'),
|
||||
'--with-systemc=%s' % self.deps_cpp_info["systemc"].rootpath,
|
||||
'--enable-static=no' if self.options.shared else '--enable-static=yes',
|
||||
'--enable-shared=yes' if self.options.shared else '--enable-shared=no',
|
||||
'--disable-debug' if self.settings.build_type == "Release" else '--disable-opt'
|
||||
]
|
||||
)
|
||||
env_build.make()
|
||||
env_build.make(args=["install"])
|
||||
#env_build.make(args=["check"])
|
||||
|
||||
def package(self):
|
||||
# Headers
|
||||
self.copy(pattern="*.h", dst="include", src="install/include", keep_path=True)
|
||||
# Libs
|
||||
self.copy(pattern="*", dst="lib", src="install/lib-linux", keep_path=False)
|
||||
self.copy(pattern="*", dst="lib", src="install/lib-linux64", keep_path=False)
|
||||
self.copy(pattern="*", dst="lib", src="install/lib-macosx", keep_path=False)
|
||||
self.copy(pattern="*", dst="lib", src="install/lib-macosx64", keep_path=False)
|
||||
self.copy(pattern="*", dst="lib", src="install/lib-cygwin", keep_path=False)
|
||||
self.copy(pattern="*", dst="lib", src="install/lib-mingw", keep_path=False)
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.libs = ["scv"]
|
14
systemc-scv/test_package/CMakeLists.txt
Normal file
14
systemc-scv/test_package/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
project(PackageTest CXX)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
|
||||
add_executable(example main.cpp)
|
||||
target_link_libraries(example ${CONAN_LIBS})
|
||||
|
||||
# CTest is a testing tool that can be used to test your project.
|
||||
# enable_testing()
|
||||
# add_test(NAME example
|
||||
# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
# COMMAND example)
|
25
systemc-scv/test_package/conanfile.py
Normal file
25
systemc-scv/test_package/conanfile.py
Normal file
@ -0,0 +1,25 @@
|
||||
from conans import ConanFile, CMake
|
||||
import os
|
||||
import pprint
|
||||
|
||||
class SystemcverificationTestConan(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {"shared": [True, False]}
|
||||
default_options = "shared=False"
|
||||
generators = "cmake"
|
||||
requires = "systemc/2.3.3"
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
# Current dir is "test_package/build/<build_id>" and CMakeLists.txt is in "test_package"
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def imports(self):
|
||||
self.copy("*.dll", dst="bin", src="bin")
|
||||
self.copy("*.dylib*", dst="bin", src="lib")
|
||||
self.copy('*.so*', dst='bin', src='lib')
|
||||
|
||||
def test(self):
|
||||
os.chdir("bin")
|
||||
self.run(".%sexample" % os.sep)
|
29
systemc-scv/test_package/main.cpp
Normal file
29
systemc-scv/test_package/main.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
// -*- C++ -*- <this line is for emacs to recognize it as C++ code>
|
||||
/*****************************************************************************
|
||||
|
||||
Licensed to Accellera Systems Initiative Inc. (Accellera)
|
||||
under one or more contributor license agreements. See the
|
||||
NOTICE file distributed with this work for additional
|
||||
information regarding copyright ownership. Accellera licenses
|
||||
this file to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
*****************************************************************************/
|
||||
#include "scv.h"
|
||||
|
||||
int sc_main(int argc, char** argv) {
|
||||
// scv_smart_ptr<int> addr("addr");
|
||||
// scv_random::set_global_seed(100);
|
||||
cout << "Success!" << endl;
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user