cleans outdated recipes

This commit is contained in:
Eyck Jentzsch 2022-10-20 21:33:32 +02:00
parent da3e9cab3f
commit e6e7e0390e
34 changed files with 31 additions and 947 deletions

View File

@ -1,11 +0,0 @@
from conan.packager import ConanMultiPackager
if __name__ == "__main__":
builder = ConanMultiPackager()
libstd = ['libstdc++11']
types = ['Debug','Release']
shared = [True,False]
configs = [[i,k] for i in shared for k in types]
for triple in configs:
builder.add(settings={"build_type":triple[1]}, options={"shared":triple[0]}, env_vars={}, build_requires={})
builder.run()

View File

@ -1,63 +0,0 @@
from conans import ConanFile, CMake, tools
import os
class LevelDBConan(ConanFile):
name = "LevelDB"
version = "1.21"
license = "https://github.com/google/leveldb/blob/master/LICENSE"
url = "https://github.com/Minres/conan-recipes/LevelDB"
use_master = True
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = "shared=True"
generators = "cmake"
exports_sources = "leveldb/*"
@property
def source_subfolder(self):
if self.use_master:
return "leveldb-master"
else:
return "leveldb-%s" % self.version
@property
def download_url(self):
if self.use_master:
return "https://github.com/google/leveldb/archive/master.zip"
else:
return "https://github.com/google/leveldb/archive/v%s.zip" % self.version
def source(self):
tools.download(self.download_url, "leveldb.zip")
tools.unzip("leveldb.zip")
# self.run("git clone https://github.com/google/leveldb.git %s" % self.source_subfolder)
def build(self):
cmake = CMake(self, parallel=True)
cmake.configure(
source_folder=self.source_subfolder,
args=[
"-DBUILD_SHARED_LIBS=ON" if self.options.shared else "-DBUILD_SHARED_LIBS=OFF",
"-DCMAKE_INSTALL_LIBDIR=lib"
]
)
cmake.build()
cmake.install()
# def package(self):
# self.copy("*", dst="include", src="%s/include" % self.zipped_folder, keep_path=True)
# self.copy("*.lib", dst="lib", keep_path=False)
# self.copy("LICENSE", src=self.zipped_folder, dst="", keep_path=False)
# if self.options.shared:
# self.copy("*.dll", dst="bin", keep_path=False)
# self.copy("*.so*", dst="lib", keep_path=False)
# else:
# self.copy("*.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["leveldb"]
if self.settings.os == "Linux":
self.cpp_info.libs.append("pthread")

View File

@ -1,8 +0,0 @@
PROJECT(PackageTest)
cmake_minimum_required(VERSION 2.8.12)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
ADD_EXECUTABLE(example example.cpp)
TARGET_LINK_LIBRARIES(example ${CONAN_LIBS})

View File

@ -1,31 +0,0 @@
from conans import ConanFile, CMake
import os
channel = os.getenv("CONAN_CHANNEL", "stable")
username = os.getenv("CONAN_USERNAME", "minres")
class LeveldbTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = "shared=True"
requires = "LevelDB/1.20@%s/%s" % (username, channel)
generators = "cmake"
def configure(self):
self.options["LevelDB"].shared = self.options.shared
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def imports(self):
self.copy("*.dll", "bin", "bin")
self.copy("*.so", "lib", "bin")
self.copy("*.dylib", "lib", "bin")
def test(self):
os.chdir("bin")
self.run("LD_LIBRARY_PATH=$(pwd) && .%sexample" % os.sep)

View File

@ -1,13 +0,0 @@
#include "leveldb/db.h"
int main() {
leveldb::DB* db;
leveldb::Options options;
options.create_if_missing = true;
leveldb::Status status = leveldb::DB::Open(options, "/tmp/testdb", &db);
if(status.ok()){
return 0;
}
return -1;
}

View File

@ -1,15 +0,0 @@
#!/usr/bin/env python3
from conan.packager import ConanMultiPackager
if __name__ == "__main__":
builder = ConanMultiPackager(username="minres")
cxxstds = ['11','14']
libstdcxx = ['libstdc++', 'libstdc++11']
shared = [True, False]
for triple in [[c,l] for c in cxxstds for l in libstdcxx]:
builder.add(
settings={"compiler.libcxx":triple[1]},
options={"stdcxx" : triple[0], "fPIC":True},
env_vars={},
build_requires={})
builder.run()

View File

@ -1,60 +0,0 @@
from conans import ConanFile, CMake, tools
import os
class RocksDBConan(ConanFile):
name = "rocksdb"
version = "6.6.4"
license = "Apache 2.0 License"
url = "https://github.com/facebook/rocksdb/"
description = "A library that provides an embeddable, persistent key-value store for fast storage."
settings = "os", "compiler", "build_type", "arch"
options = {"stdcxx":[11,14], "fPIC":[True, False]}
default_options = "stdcxx=14", "fPIC=True"
generators = ["cmake", "cmake_find_package", "cmake_paths"]
source_subfolder = "rocksdb-%s"% version
exports_sources = "rocksdb/*"
source_tgz = "https://github.com/facebook/rocksdb/archive/v%s.tar.gz" % version
requires = (
"zlib/1.2.11@conan/stable",
"bzip2/1.0.8@conan/stable",
"lz4/1.8.0@bincrafters/stable",
"gflags/2.2.2"
# TODO snappy, zstandard
)
def source(self):
self.output.info("Downloading %s" %self.source_tgz)
tools.download(self.source_tgz, "rocksdb.tar.gz")
tools.unzip("rocksdb.tar.gz")
os.remove("rocksdb.tar.gz")
def build(self):
cmake = CMake(self, parallel=True)
cmake.configure(
source_folder=self.source_subfolder,
args=[
'-DCMAKE_CXX_FLAGS:="-D_GLIBCXX_USE_CXX11_ABI=%d"' % (0 if self.settings.compiler.libcxx == 'libstdc++' else 1),
#'-DROCKSDB_BUILD_SHARED=%s' % ('ON' if self.options.shared else 'OFF'),
'-DCMAKE_POSITION_INDEPENDENT_CODE=%s' % ('ON' if self.options.fPIC else 'OFF'),
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx,
'-DWITH_LZ4=ON -DWITH_ZLIB=ON -DWITH_BZ2=ON -DDISABLE_STALL_NOTIF=ON -DWITH_TESTS=OFF',
#'-DWITH_LZ4=ON -DWITH_ZLIB=ON -DWITH_BZ2=ON -DDISABLE_STALL_NOTIF=ON -DWITH_TOOLS=OFF -DWITH_TESTS=OFF',
#'-DWITH_BENCHMARK_TOOLS=OFF -DWITH_CORE_TOOLS=OFF -DWITH_TOOLS=OFF -DWITH_TESTS=OFF'
]
)
cmake.build(target='rocksdb')
#cmake.install()
def package(self):
self.copy("LICENSE.Apache", src=self.source_subfolder, keep_path=False)
self.copy("LICENSE.leveldb", src=self.source_subfolder, keep_path=False)
self.copy("*.h", dst="include", src=("%s/include" % self.source_subfolder))
self.copy("librocksdb.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["rocksdb"]
if self.settings.os == "Linux":
self.cpp_info.libs.append("pthread")

View File

@ -1,12 +0,0 @@
project(PackageTest CXX)
cmake_minimum_required(VERSION 3.12)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(rocks_sample rocksdb.cpp)
target_link_libraries(rocks_sample CONAN_PKG::rocksdb)
target_link_libraries(rocks_sample CONAN_PKG::gflags)

View File

@ -1,28 +0,0 @@
from conans import ConanFile, CMake
import os
class RocksdbTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {"stdcxx":[11,14], "fPIC":[True, False]}
default_options = "stdcxx=14", "fPIC=True"
generators = "cmake"
def configure(self):
self.options["rocksdb"].stdcxx = self.options.stdcxx
self.options["rocksdb"].fPIC = self.options.fPIC
def build(self):
cmake = CMake(self)
cmake.definitions["CMAKE_CXX_STANDARD"] = self.options["rocksdb"].stdcxx
cmake.definitions["CMAKE_CXX_FLAGS"]="-D_GLIBCXX_USE_CXX11_ABI=%d" %(0 if self.settings.compiler.libcxx == 'libstdc++' else 1)
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(".%srocks_sample" % os.sep)

View File

@ -1,16 +0,0 @@
#include <cassert>
#include "rocksdb/db.h"
int main()
{
rocksdb::DB * db;
rocksdb::Options options;
options.create_if_missing = true;
rocksdb::Status status = rocksdb::DB::Open(options, "/tmp/testrocksdb", &db);
assert(status.ok());
return 0;
}

View File

@ -1,2 +0,0 @@
/cci-0.9.0*
/cci-1.0.0

View File

@ -1,76 +0,0 @@
cmake_minimum_required(VERSION 3.8)
project(cci)
set(LIBRARY_VERSION_MAJOR 1 CACHE STRING "major version" FORCE)
set(LIBRARY_VERSION_MINOR 0 CACHE STRING "minor version" FORCE)
set(LIBRARY_VERSION_PATCH 0 CACHE STRING "minor version" FORCE)
set(LIBRARY_VERSION ${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH} CACHE STRING "version" FORCE)
set(LIBRARY_NAME cciapi)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
if(DEFINED ENV{SYSTEMC_HOME})
set(SYSTEMC_ROOT $ENV{SYSTEMC_HOME})
else()
message(ERROR "SYSTEMC_HOME environment variable not defined")
endif()
if(DEFINED ENV{RAPIDJSON_HOME})
set(RAPIDJSON $ENV{RAPIDJSON_HOME})
else()
set(RAPIDJSON ${CMAKE_CURRENT_SOURCE_DIR}/packages/rapidjson)
endif()
if(EXISTS "${SYSTEMC_ROOT}/lib/")
set(SYSTEMC_LIBDIR ${SYSTEMC_ROOT}/lib)
elseif(EXISTS "${SYSTEMC_ROOT}/lib-linux/")
set(SYSTEMC_LIBDIR ${SYSTEMC_ROOT}/lib-linux)
elseif(EXISTS "${SYSTEMC_ROOT}/lib-linux64/")
set(SYSTEMC_LIBDIR ${SYSTEMC_ROOT}/lib-linux64)
endif()
FILE(GLOB CFG_HEADER_FILES src/cci_cfg/*.h )
FILE(GLOB CORE_HEADER_FILES src/cci_core/*.h )
FILE(GLOB UTILS_HEADER_FILES src/cci_utils/*.h )
set(SOURCES
src/cci_cfg/cci_broker_handle.cpp
src/cci_cfg/cci_broker_manager.cpp
src/cci_cfg/cci_originator.cpp
src/cci_cfg/cci_param_if.cpp
src/cci_cfg/cci_param_untyped.cpp
src/cci_cfg/cci_param_untyped_handle.cpp
src/cci_cfg/cci_report_handler.cpp
src/cci_core/cci_name_gen.cpp
src/cci_core/cci_value_converter.cpp
src/cci_core/cci_value.cpp
src/cci_utils/broker.cpp
src/cci_utils/consuming_broker.cpp
)
link_directories(${SYSTEMC_LIBDIR})
add_library(${LIBRARY_NAME} ${SOURCES})
target_include_directories(${LIBRARY_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_include_directories(${LIBRARY_NAME} PRIVATE ${SYSTEMC_ROOT}/include)
target_include_directories(${LIBRARY_NAME} PUBLIC ${RAPIDJSON}/include)
target_link_libraries(${LIBRARY_NAME} systemc)
install(TARGETS ${LIBRARY_NAME}
EXPORT ${PROJECT_NAME}Targets # for downstream dependencies
ARCHIVE DESTINATION lib COMPONENT libs # static lib
LIBRARY DESTINATION lib COMPONENT libs # shared lib
FRAMEWORK DESTINATION bin COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION include COMPONENT devel # headers for mac (note the different component -> different package)
INCLUDES DESTINATION include # headers
PUBLIC_HEADER DESTINATION include
)
install(FILES src/cci_configuration DESTINATION include)
install(FILES ${CFG_HEADER_FILES} DESTINATION include/cci_cfg)
install(FILES ${CORE_HEADER_FILES} DESTINATION include/cci_core)
install(FILES ${UTILS_HEADER_FILES} DESTINATION include/cci_utils)

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python3
from conan.packager import ConanMultiPackager
if __name__ == "__main__":
builder = ConanMultiPackager(username="minres")
types = ['Debug','Release']
cxxstds = ['98', '11','14']
libstdcxx = ['libstdc++', 'libstdc++11']
shared = [True, False]
for triple in [[i,k,l,s] for i in cxxstds for k in types for l in libstdcxx for s in shared]:
if triple[0] != '98' or triple[2] != 'libstdc++11':
builder.add(
settings={"build_type":triple[1],"compiler.libcxx":triple[2]},
options={"stdcxx" : triple[0], "shared" : triple[3]},
env_vars={},
build_requires={})
builder.run()

View File

@ -1,71 +0,0 @@
*** a/cci-1.0.0/packages/rapidjson/include/rapidjson/document.h 2018-07-11 08:24:31.520031354 +0200
--- b/cci-1.0.0/packages/rapidjson/include/rapidjson/document.h 2018-07-11 08:51:58.559221920 +0200
***************
*** 1425,1431 ****
MemberIterator pos = MemberBegin() + (first - MemberBegin());
for (MemberIterator itr = pos; itr != last; ++itr)
itr->~Member();
! std::memmove(&*pos, &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
data_.o.size -= static_cast<SizeType>(last - first);
return pos;
}
--- 1425,1431 ----
MemberIterator pos = MemberBegin() + (first - MemberBegin());
for (MemberIterator itr = pos; itr != last; ++itr)
itr->~Member();
! std::memmove((void*)&*pos, &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
data_.o.size -= static_cast<SizeType>(last - first);
return pos;
}
***************
*** 1629,1635 ****
ValueIterator pos = Begin() + (first - Begin());
for (ValueIterator itr = pos; itr != last; ++itr)
itr->~GenericValue();
! std::memmove(pos, last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
data_.a.size -= static_cast<SizeType>(last - first);
return pos;
}
--- 1629,1635 ----
ValueIterator pos = Begin() + (first - Begin());
for (ValueIterator itr = pos; itr != last; ++itr)
itr->~GenericValue();
! std::memmove((void*)pos, last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
data_.a.size -= static_cast<SizeType>(last - first);
return pos;
}
***************
*** 1936,1942 ****
if (count) {
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
SetElementsPointer(e);
! std::memcpy(e, values, count * sizeof(GenericValue));
}
else
SetElementsPointer(0);
--- 1936,1942 ----
if (count) {
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
SetElementsPointer(e);
! std::memcpy((void*)e, values, count * sizeof(GenericValue));
}
else
SetElementsPointer(0);
***************
*** 1949,1955 ****
if (count) {
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
SetMembersPointer(m);
! std::memcpy(m, members, count * sizeof(Member));
}
else
SetMembersPointer(0);
--- 1949,1955 ----
if (count) {
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
SetMembersPointer(m);
! std::memcpy((void*)m, members, count * sizeof(Member));
}
else
SetMembersPointer(0);

View File

@ -1,46 +0,0 @@
from conans import ConanFile, CMake
class SystemC_CCIConan(ConanFile):
name = "SystemC-CCI"
version = "1.0.0"
license = "Apache 2.0 License"
url = "https://github.com/Minres/conan-recipes/blob/master/SystemC-CCI"
description = "The SystemC Configuration, Control and Inspection (CCI) allows tools to seamlessly and consistently interact with models to provide essential capabilities."
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "stdcxx":[98,11,14]}
default_options = "shared=True","stdcxx=98"
generators = "cmake"
source_subfolder = "cci-1.0.0"
exports_sources = "cci-1.0.0/*"
requires = "SystemC/2.3.3@minres/stable"
def configure(self):
self.options["SystemC"].stdcxx = self.options.stdcxx
def build(self):
cmake = CMake(self, parallel=True)
cmake.configure(
source_folder=self.source_subfolder,
args=[
'-DCMAKE_CXX_FLAGS:="-D_GLIBCXX_USE_CXX11_ABI=%d"' % (0 if self.settings.compiler.libcxx == 'libstdc++' else 1),
'-DBUILD_SHARED_LIBS=ON' if self.options.shared else '-DBUILD_SHARED_LIBS=OFF',
'-DCMAKE_INSTALL_LIBDIR=lib',
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx,
'-DSYSTEMC_ROOT=%s' % self.deps_cpp_info["SystemC"].rootpath
]
)
cmake.build()
cmake.install()
def package(self):
pass
# Headers
#inc_dir = os.path.join(self.source_subfolder, 'src')
#self.copy(pattern="cci_configuration", dst="include", src=inc_dir, keep_path=True)
#self.copy(pattern="*.h", dst="include", src=inc_dir, keep_path=True)
# Libs
#lib_dir = os.path.join(self.source_subfolder, 'lib')
#self.copy(pattern="*", dst="lib", src=lib_dir, keep_path=False)
def package_info(self):
self.cpp_info.libs = ["cciapi"]

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python3
from conan.packager import ConanMultiPackager
if __name__ == "__main__":
builder = ConanMultiPackager(username="minres")
types = ['Debug','Release']
cxxstds = ['11','14']
libstdcxx = ['libstdc++', 'libstdc++11']
shared = [True, False]
for triple in [[i,k,l,s] for i in cxxstds for k in types for l in libstdcxx for s in shared]:
if triple[0] != '98' or triple[2] != 'libstdc++11':
builder.add(
settings={"build_type":triple[1],"compiler.libcxx":triple[2]},
options={"stdcxx" : triple[0], "shared" : triple[3]},
env_vars={},
build_requires={})
builder.run()

View File

@ -1,51 +0,0 @@
from conans import ConanFile, CMake, tools
import os
class SystemCComponentsConan(ConanFile):
name = "scc"
version = "1.0.0"
license = "Apache 2.0 License"
url = "https://github.com/Minres/SystemC-Components"
description = "light weight productivity library for SystemC and TLM 2.0"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "stdcxx":[11,14,17], "fPIC":[True, False]}
default_options = "shared=True", "stdcxx=11", "fPIC=True"
generators = ["cmake", "cmake_find_package"]
requires = (
"boost/1.70.0@conan/stable",
"SystemC/2.3.3@minres/stable",
"SystemCVerification/2.0.1@minres/stable",
"SystemC-CCI/1.0.0@minres/stable"
)
def source(self):
self.run("git clone --recursive --branch %s https://github.com/Minres/SystemC-Components.git src" % self.version)
def configure(self):
self.options["SystemC"].stdcxx = self.options.stdcxx
self.options["SystemCVerification"].stdcxx = self.options.stdcxx
self.options["SystemC-CCI"].stdcxx = self.options.stdcxx
def build(self):
cmake = CMake(self, parallel=True)
cmake.configure(
source_folder='src',
args=[
'-DCMAKE_CXX_FLAGS:="-D_GLIBCXX_USE_CXX11_ABI=%d"' % (0 if self.settings.compiler.libcxx == 'libstdc++' else 1),
'-DBUILD_SHARED_LIBS=ON' if self.options.shared else '-DBUILD_SHARED_LIBS=OFF',
'-DCMAKE_POSITION_INDEPENDENT_CODE=%s' % ('ON' if self.options.fPIC else 'OFF'),
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx,
'-DSYSTEMC_PREFIX=%s' % self.deps_cpp_info["SystemC"].rootpath,
'-DSCV_PREFIX=%s' % self.deps_cpp_info["SystemCVerification"].rootpath,
'-DCCI_PREFIX=%s' % self.deps_cpp_info["SystemC-CCI"].rootpath,
]
)
cmake.build()
cmake.install()
def package_info(self):
pass
def package_info(self):
self.cpp_info.libs = ["scc"]

1
SystemC/.gitignore vendored
View File

@ -1 +0,0 @@
/systemc*

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python3
from conan.packager import ConanMultiPackager
if __name__ == "__main__":
builder = ConanMultiPackager(username="minres")
types = ['Debug','Release']
cxxstds = ['98', '11','14']
libstdcxx = ['libstdc++', 'libstdc++11']
shared = [True, False]
for triple in [[i,k,l,s] for i in cxxstds for k in types for l in libstdcxx for s in shared]:
if triple[0] != '98' or triple[2] != 'libstdc++11':
builder.add(
settings={"build_type":triple[1],"compiler.libcxx":triple[2]},
options={"stdcxx" : triple[0], "shared" : triple[3]},
env_vars={},
build_requires={})
builder.run()

View File

@ -1,45 +0,0 @@
from conans import ConanFile, CMake
class SystemCConan(ConanFile):
name = "SystemC"
version = "2.3.3"
license = "Apache 2.0 License"
url = "https://github.com/Minres/conan-recipes/blob/master/SystemC"
description = "SystemC is a set of C++ classes and macros which provide an event-driven simulation interface (see also discrete event simulation)."
settings = "os", "compiler", "build_type", "arch"
options = {"shared":[True, False], "stdcxx":[98,11,14], "phase_cb":[True, False]}
default_options = "shared=True","stdcxx=11","phase_cb=False"
generators = "cmake"
source_subfolder = "systemc-2.3.3"
exports_sources = "systemc-2.3.3/*"
def build(self):
cmake = CMake(self, parallel=True)
cmake.configure(
source_folder=self.source_subfolder,
args=[
'-DCMAKE_CXX_FLAGS:="-D_GLIBCXX_USE_CXX11_ABI=%d"' % (0 if self.settings.compiler.libcxx == 'libstdc++' else 1),
'-DBUILD_SHARED_LIBS=%s' % ('ON' if self.options.shared else 'OFF'),
'-DCMAKE_INSTALL_LIBDIR=lib',
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx,
'-DENABLE_PHASE_CALLBACKS=%s' % ('ON' if self.options.phase_cb else 'OFF'),
'-DENABLE_PHASE_CALLBACKS_TRACING=%s' % ('ON' if self.options.phase_cb else 'OFF')
]
)
cmake.build()
cmake.install()
def package(self):
pass
# Headers
#self.copy(pattern="*.h", dst="include", src="package/include", keep_path=True)
# Libs
#self.copy(pattern="*", dst="lib", src="package/lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["systemc"]
if self.settings.os == "Linux":
self.cpp_info.libs.append("pthread")

View File

@ -1,17 +0,0 @@
project(PackageTest CXX)
cmake_minimum_required(VERSION 2.8.12)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(example example.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)

View File

@ -1,28 +0,0 @@
from conans import ConanFile, CMake
import os
class SystemcTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {"stdcxx":[98,11,14], "shared":[True,False]}
default_options = "stdcxx=11","shared=True"
generators = "cmake"
def configure(self):
self.options["SystemC"].stdcxx = self.options.stdcxx
self.options["SystemC"].shared = self.options.shared
def build(self):
cmake = CMake(self)
cmake.definitions["CMAKE_CXX_STANDARD"] = self.options["SystemC"].stdcxx
cmake.definitions["CMAKE_CXX_FLAGS"]="-D_GLIBCXX_USE_CXX11_ABI=%d" %(0 if self.settings.compiler.libcxx == 'libstdc++' else 1)
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)

View File

@ -1,7 +0,0 @@
#include <iostream>
#include "systemc"
int sc_main(int argc, char* argv[]) {
printf("Success!\n");
return 0;
}

View File

@ -1,17 +0,0 @@
#!/usr/bin/env python3
from conan.packager import ConanMultiPackager
if __name__ == "__main__":
builder = ConanMultiPackager(username="minres")
types = ['Debug','Release']
cxxstds = ['98', '11','14']
libstdcxx = ['libstdc++', 'libstdc++11']
shared = [True,False]
for triple in [[i,k,l,s] for i in cxxstds for k in types for l in libstdcxx for s in shared]:
if triple[0] != '98' or triple[2] != 'libstdc++11':
builder.add(
settings={"build_type":triple[1],"compiler.libcxx":triple[2]},
options={"stdcxx" : triple[0], "shared" : triple[3]},
env_vars={},
build_requires={})
builder.run()

View File

@ -1,130 +0,0 @@
diff -rupN scv-2.0.0a-20161019/configure scv-2.0.0a-20161019-patched/configure
--- scv-2.0.0a-20161019/configure 2016-10-19 23:25:31.000000000 +0200
+++ scv-2.0.0a-20161019-patched/configure 2017-10-28 17:00:36.367027496 +0200
@@ -16136,7 +16136,7 @@ sparc)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$SPARC_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$SPARC_GNU_CFLAGS"
@@ -16152,8 +16152,8 @@ sparc)
echo 'setting library options for g++ on Solaris'
;;
'') echo 'setting compiler flags for NOT g++'
- AM_CXXFLAGS="$SPARC_CC_CXXFLAGS"
- CXXFLAGS="$SUN_CC_OPT $SUN_CC_DBG"
+ AM_CXXFLAGS="$SPARC_CC_CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $SUN_CC_OPT $SUN_CC_DBG"
CXXFLAGS_DEBUG="$DEF_SUN_CC_DBG"
CXXFLAGS_OPT="$DEF_SUN_CC_OPT"
AM_CFLAGS="$SPARC_CC_CFLAGS"
@@ -16173,7 +16173,7 @@ hppa*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$HPPA_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$HPPA_GNU_CFLAGS"
@@ -16192,7 +16192,7 @@ hppa*)
;;
'') echo 'setting compiler flags and defines for HP aCC'
AM_CXXFLAGS="$HPPA_ACC_CXXFLAGS"
- CXXFLAGS="$HP_ACC_OPT $HP_ACC_DBG"
+ CXXFLAGS="$CXXFLAGS $HP_ACC_OPT $HP_ACC_DBG"
CXXFLAGS_DEBUG="$DEF_HP_ACC_DBG"
CXXFLAGS_OPT="$DEF_HP_ACC_OPT"
AM_CFLAGS="$HPPA_ACC_XFLAGS"
@@ -16216,7 +16216,7 @@ powerpc*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16235,7 +16235,7 @@ powerpc*)
;;
'') echo 'setting compiler flags for NOT g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16256,7 +16256,7 @@ i[3456]86*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16275,7 +16275,7 @@ i[3456]86*)
;;
'') echo 'setting compiler flags for NOT g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16296,7 +16296,7 @@ x86_64*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16315,7 +16315,7 @@ x86_64*)
;;
'') echo 'setting compiler flags for NOT g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
diff -rupN scv-2.0.0a-20161019/src/scv/_scv_introspection.h scv-2.0.0a-20161019-patched/src/scv/_scv_introspection.h
--- scv-2.0.0a-20161019/src/scv/_scv_introspection.h 2016-10-19 23:25:31.000000000 +0200
+++ scv-2.0.0a-20161019-patched/src/scv/_scv_introspection.h 2017-10-28 10:54:04.359018484 +0200
@@ -553,7 +553,7 @@ public: \
_SCV_MAP(int,length) \
_SCV_MAP(int,size) \
sc_logic_value_t get_bit(int i) const \
- { this->initialize(); return this->_get_instance()->get_bit(i); } \
+ { this->initialize(); return sc_logic_value_t(this->_get_instance()->get_bit(i)); } \
void set_bit(int i, sc_logic_value_t v) \
{ this->initialize(); this->_get_instance()->set_bit(i,v); this->trigger_value_change_cb(); } \
unsigned long get_word(int i) const \
diff -rupN scv-2.0.0a-20161019/src/scv/scv_random.cpp scv-2.0.0a-20161019-patched/src/scv/scv_random.cpp
--- scv-2.0.0a-20161019/src/scv/scv_random.cpp 2016-10-19 23:25:31.000000000 +0200
+++ scv-2.0.0a-20161019-patched/src/scv/scv_random.cpp 2017-10-28 10:56:49.880659476 +0200
@@ -49,6 +49,7 @@
#include <cstdio>
#include <cstdlib>
+#include <cstring>
#if ((defined _MSC_VER) || (defined _WIN32))
diff -rupN scv-2.0.0a-20161019/src/scv/scv_util.cpp scv-2.0.0a-20161019-patched/src/scv/scv_util.cpp
--- scv-2.0.0a-20161019/src/scv/scv_util.cpp 2016-10-19 23:25:31.000000000 +0200
+++ scv-2.0.0a-20161019-patched/src/scv/scv_util.cpp 2017-10-28 10:58:02.323613714 +0200
@@ -44,7 +44,7 @@
#include "scv/scv_util.h"
#include "scv/_scv_associative_array.h"
#include "scv/scv_report.h"
-
+#include <cstring>
/* ************************************************************************** */
// For cdsIdent:

View File

@ -1,95 +0,0 @@
diff -rupN scv-2.0.0a-20161019/configure scv-2.0.0a-20161019-patched/configure
--- scv-2.0.0a-20161019/configure 2016-10-19 23:25:31.000000000 +0200
+++ scv-2.0.0a-20161019-patched/configure 2017-10-28 17:00:36.367027496 +0200
@@ -16136,7 +16136,7 @@ sparc)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$SPARC_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$SPARC_GNU_CFLAGS"
@@ -16152,8 +16152,8 @@ sparc)
echo 'setting library options for g++ on Solaris'
;;
'') echo 'setting compiler flags for NOT g++'
- AM_CXXFLAGS="$SPARC_CC_CXXFLAGS"
- CXXFLAGS="$SUN_CC_OPT $SUN_CC_DBG"
+ AM_CXXFLAGS="$SPARC_CC_CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $SUN_CC_OPT $SUN_CC_DBG"
CXXFLAGS_DEBUG="$DEF_SUN_CC_DBG"
CXXFLAGS_OPT="$DEF_SUN_CC_OPT"
AM_CFLAGS="$SPARC_CC_CFLAGS"
@@ -16173,7 +16173,7 @@ hppa*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$HPPA_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$HPPA_GNU_CFLAGS"
@@ -16192,7 +16192,7 @@ hppa*)
;;
'') echo 'setting compiler flags and defines for HP aCC'
AM_CXXFLAGS="$HPPA_ACC_CXXFLAGS"
- CXXFLAGS="$HP_ACC_OPT $HP_ACC_DBG"
+ CXXFLAGS="$CXXFLAGS $HP_ACC_OPT $HP_ACC_DBG"
CXXFLAGS_DEBUG="$DEF_HP_ACC_DBG"
CXXFLAGS_OPT="$DEF_HP_ACC_OPT"
AM_CFLAGS="$HPPA_ACC_XFLAGS"
@@ -16216,7 +16216,7 @@ powerpc*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16235,7 +16235,7 @@ powerpc*)
;;
'') echo 'setting compiler flags for NOT g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16256,7 +16256,7 @@ i[3456]86*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16275,7 +16275,7 @@ i[3456]86*)
;;
'') echo 'setting compiler flags for NOT g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16296,7 +16296,7 @@ x86_64*)
case "$GXX" in
yes) echo 'setting compiler flags for g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"
@@ -16315,7 +16315,7 @@ x86_64*)
;;
'') echo 'setting compiler flags for NOT g++'
AM_CXXFLAGS="$LINUX_GNU_CXXFLAGS"
- CXXFLAGS="$GNU_OPT $GNU_DBG"
+ CXXFLAGS="$CXXFLAGS $GNU_OPT $GNU_DBG"
CXXFLAGS_DEBUG="$DEF_GNU_DBG"
CXXFLAGS_OPT="$DEF_GNU_OPT"
AM_CFLAGS="$LINUX_GNU_CFLAGS"

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python3
from conan.packager import ConanMultiPackager
from cpt.packager import ConanMultiPackager
if __name__ == "__main__":
builder = ConanMultiPackager(username="minres")
builder = ConanMultiPackager()
types = ['Debug','Release']
for t in types:
builder.add(settings={"build_type":t}, options={}, env_vars={}, build_requires={})

View File

@ -1,20 +0,0 @@
from conans import ConanFile, CMake, tools
class ElfioConan(ConanFile):
name = "elfio"
version = "3.4"
license = "MIT License"
url = "http://git.code.sf.net/p/elfio/code"
description = "ELFIO is a header-only C++ library intended for reading and generating files in the ELF binary format"
no_copy_source = True
def source(self):
self.run("git clone http://git.code.sf.net/p/elfio/code")
def package(self):
self.copy("elfio/*.hpp", dst="include", src="code")
def package_info(self):
self.info.header_only()

13
systemc-scv/build.py Executable file
View 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()

View File

@ -2,35 +2,32 @@ from conans import ConanFile, tools, AutoToolsBuildEnvironment
import os
class SystemcverificationConan(ConanFile):
name = "SystemCVerification"
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"
options = {"shared": [True, False], "stdcxx":[98,11,14]}
default_options = "shared=True","stdcxx=98"
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@minres/stable"
requires = "systemc/2.3.3"
def configure(self):
self.options["SystemC"].stdcxx = self.options.stdcxx
def build(self):
env_build = AutoToolsBuildEnvironment(self)
if self.options.stdcxx == "14":
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.options.stdcxx == "11":
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.options.stdcxx == "98":
elif self.settings.cppstd == "98":
env_build.cxx_flags = "-std=gnu++98"
env_build.fpic = True
tools.mkdir("build")
@ -44,10 +41,10 @@ class SystemcverificationConan(ConanFile):
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 --enable-shared=yes' if self.options.shared else '--enable-static=yes --enable-shared=no'
#'--disable-debug',
#'--disable-opt'
'--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()

View File

@ -4,24 +4,15 @@ import pprint
class SystemcverificationTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "stdcxx":[98,11,14]}
default_options = "shared=True","stdcxx=98"
options = {"shared": [True, False]}
default_options = "shared=False"
generators = "cmake"
requires = "SystemC/2.3.3@minres/stable"
def configure(self):
self.options["SystemCVerification"].stdcxx = self.options.stdcxx
#if self.settings.compiler == 'gcc' and self.settings.compiler.version > 5:
#self.output.info("Forcing use of libstdc++11")
#self.settings.compiler.libcxx='libstdc++11'
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(
args=[
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx
])
cmake.configure()
cmake.build()
def imports(self):