Updated conanfiles to work with release 1.0 of conan.io.
This commit is contained in:
parent
2f922aae4f
commit
895abb8766
12
README.md
12
README.md
|
@ -13,13 +13,13 @@ to build all variations run
|
|||
|
||||
```
|
||||
cd Seasocks
|
||||
CONAN_USER=<username> CONAN_CHANNEL=<channel name> python build.py
|
||||
CONAN_USERNAME=<username> CONAN_CHANNEL=<channel name> python build.py
|
||||
```
|
||||
|
||||
to build a specific variant run the following commands:
|
||||
|
||||
```
|
||||
conan test_package Seasocks/1.3.2@<username>/<channel name> -s build_type=<build type> -s compiler.libcxx=<libstdc++ variant>
|
||||
conan create . Seasocks/1.3.2@<username>/<channel name> -s build_type=<build type> -s compiler.libcxx=<libstdc++ variant>
|
||||
```
|
||||
|
||||
## SystemC
|
||||
|
@ -28,13 +28,13 @@ download the SystemC distribution from http://www.accellera.org/downloads/standa
|
|||
|
||||
```
|
||||
cd SystemC
|
||||
CONAN_USER=<usernam> CONAN_CHANNEL=<channel name> python build.py
|
||||
CONAN_USERNAME=<username> CONAN_CHANNEL=<channel name> python build.py
|
||||
```
|
||||
|
||||
to build a specific variant run the following command
|
||||
|
||||
```
|
||||
conan test_package SystemC/2.3.2@minres/<channel name> -o SystemC:stdcxx=<c++ std variant> -s build_type=<build type>
|
||||
conan create . SystemC/2.3.2@minres/<channel name> -o stdcxx=<c++ std variant> -s build_type=<build type>
|
||||
```
|
||||
|
||||
where <c++ std variant> is one of 98, 11, or 14
|
||||
|
@ -45,13 +45,13 @@ download the SystemC distribution from http://www.accellera.org/downloads/standa
|
|||
|
||||
```
|
||||
cd SystemCVerification
|
||||
CONAN_USER=<usernam> CONAN_CHANNEL=<channel name> python build.py
|
||||
CONAN_USERNAME=<username> CONAN_CHANNEL=<channel name> python build.py
|
||||
```
|
||||
|
||||
to build a specific variant run the following command
|
||||
|
||||
```
|
||||
conan test_package SystemCVerification/2.0.0.a@minres/<channel name> -o SystemC:stdcxx=<c++ std variant> -s build_type=<build type>
|
||||
conan create . SystemCVerification/2.0.1a@minres/<channel name> -o stdcxx=<c++ std variant> -s build_type=<build type>
|
||||
```
|
||||
|
||||
where <c++ std variant> is one of 98, 11, or 14
|
||||
|
|
|
@ -26,8 +26,9 @@ conan_basic_setup()''')
|
|||
|
||||
def build(self):
|
||||
cmake = CMake(self, parallel=True)
|
||||
self.run('cmake seasocks %s' % cmake.command_line)
|
||||
self.run("cmake --build . --target install %s" % cmake.build_config)
|
||||
cmake.configure(source_folder="seasocks")
|
||||
cmake.build()
|
||||
cmake.install()
|
||||
|
||||
#def package(self):
|
||||
# nothing to do here now
|
||||
|
|
|
@ -3,13 +3,17 @@ import os
|
|||
|
||||
class SeasocksTestConan(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {"shared": [True, False]}
|
||||
default_options = "shared=True"
|
||||
generators = "cmake"
|
||||
build_requires = "Catch/1.9.2@uilianries/stable"
|
||||
|
||||
def configure(self):
|
||||
self.options["Seasocks"].shared = self.options.shared
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
# Current dir is "test_package/build/<build_id>" and CMakeLists.txt is in "test_package"
|
||||
cmake.configure(source_dir=self.conanfile_directory, build_dir="./")
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def imports(self):
|
||||
|
|
|
@ -2,13 +2,11 @@ from conan.packager import ConanMultiPackager
|
|||
|
||||
if __name__ == "__main__":
|
||||
builder = ConanMultiPackager()
|
||||
cxxstds = ['98','11','14']
|
||||
archs = ['x86', 'x86_64']
|
||||
types = ['Debug','Release']
|
||||
#configs = [[i,j,k] for i in cxxstds for j in archs for k in types]
|
||||
#for triple in configs:
|
||||
# builder.add(settings={"arch": triple[1], "build_type":triple[2]}, options={"SystemC:stdcxx" : triple[0]}, env_vars={}, build_requires={})
|
||||
configs = [[i,k] for i in cxxstds for k in types]
|
||||
cxxstds = ['98', '11','14']
|
||||
shared = [True,False]
|
||||
configs = [[i,k,s] for i in cxxstds for k in types for s in shared]
|
||||
for triple in configs:
|
||||
builder.add(settings={"build_type":triple[1]}, options={"SystemC:stdcxx" : triple[0]}, env_vars={}, build_requires={})
|
||||
builder.add(settings={"build_type":triple[1]}, options={"stdcxx" : triple[0], "shared" : triple[2]}, env_vars={}, build_requires={})
|
||||
builder.run()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from conans import ConanFile, CMake
|
||||
|
||||
|
||||
class SeasocksConan(ConanFile):
|
||||
class SystemCConan(ConanFile):
|
||||
name = "SystemC"
|
||||
version = "2.3.2"
|
||||
license = "Apache 2.0 License"
|
||||
|
@ -11,24 +11,28 @@ class SeasocksConan(ConanFile):
|
|||
options = {"shared": [True, False], "stdcxx":[98,11,14]}
|
||||
default_options = "shared=True","stdcxx=98"
|
||||
generators = "cmake"
|
||||
source_subfolder = "systemc-2.3.2"
|
||||
exports_sources = "systemc-2.3.2/*"
|
||||
|
||||
|
||||
# def build_id(self):
|
||||
# self.info_build.settings.build_type = "Any"
|
||||
|
||||
# def source(self):
|
||||
# self.run("git clone https://github.com/Minres/SystemCLanguage.git")
|
||||
# self.run("cd SystemCLanguage && git checkout master")
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self, parallel=True)
|
||||
cmake.configure(source_dir="%s/systemc-2.3.2" % self.source_folder)
|
||||
shared = "-DBUILD_SHARED_LIBS=ON" if self.options.shared else "-DBUILD_SHARED_LIBS=OFF"
|
||||
self.run('cmake systemc-2.3.2 %s %s -DCMAKE_CXX_STANDARD=%s' % (cmake.command_line, shared, self.options.stdcxx))
|
||||
# self.run("cmake --build . %s" % cmake.build_config)
|
||||
self.run("cmake --build . --target install %s" % cmake.build_config)
|
||||
cmake.configure(
|
||||
source_folder=self.source_subfolder,
|
||||
args=[
|
||||
"-DBUILD_SHARED_LIBS=ON" if self.options.shared else "-DBUILD_SHARED_LIBS=OFF",
|
||||
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx
|
||||
]
|
||||
)
|
||||
cmake.build()
|
||||
cmake.install()
|
||||
|
||||
def package(self):
|
||||
# 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"]
|
||||
self.cpp_info.libs = ["systemc", "pthread"]
|
||||
|
||||
|
|
|
@ -3,16 +3,19 @@ import os
|
|||
|
||||
class SystemcTestConan(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {"stdcxx":[98,11,14], "shared":[True,False]}
|
||||
default_options = "stdcxx=98","shared=True"
|
||||
generators = "cmake"
|
||||
|
||||
def configure(self):
|
||||
self.options["SystemC"].stdcxx = self.options.stdcxx
|
||||
self.options["SystemC"].shared = self.options.shared
|
||||
|
||||
def build(self):
|
||||
cxxstd = self.options["SystemC"].stdcxx
|
||||
cmake = CMake(self)
|
||||
# Current dir is "test_package/build/<build_id>" and CMakeLists.txt is in "test_package"
|
||||
cmake.configure(source_dir=self.conanfile_directory, build_dir="./")
|
||||
#cmake.build()
|
||||
self.run('cmake %s %s -DCMAKE_CXX_STANDARD=%s' % (self.conanfile_directory, cmake.command_line, cxxstd))
|
||||
self.run("cmake --build . %s" % cmake.build_config)
|
||||
cmake.definitions["CMAKE_CXX_STANDARD"] = self.options["SystemC"].stdcxx
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def imports(self):
|
||||
self.copy("*.dll", dst="bin", src="bin")
|
||||
|
|
|
@ -2,13 +2,10 @@ from conan.packager import ConanMultiPackager
|
|||
|
||||
if __name__ == "__main__":
|
||||
builder = ConanMultiPackager()
|
||||
cxxstds = ['98','11','14']
|
||||
archs = ['x86', 'x86_64']
|
||||
types = ['Debug','Release']
|
||||
#configs = [[i,j,k] for i in cxxstds for j in archs for k in types]
|
||||
#for triple in configs:
|
||||
# builder.add(settings={"arch": triple[1], "build_type":triple[2]}, options={"SystemCVerification:stdcxx" : triple[0]}, env_vars={}, build_requires={})
|
||||
cxxstds = ['98','11','14']
|
||||
configs = [[i,k] for i in cxxstds for k in types]
|
||||
for triple in configs:
|
||||
builder.add(settings={"build_type":triple[1]}, options={"SystemCVerification:stdcxx" : triple[0]}, env_vars={}, build_requires={})
|
||||
builder.add(settings={"build_type":triple[1]}, options={"stdcxx" : triple[0]}, env_vars={}, build_requires={})
|
||||
builder.run()
|
||||
|
|
|
@ -1,59 +1,57 @@
|
|||
from conans import ConanFile, tools, AutoToolsBuildEnvironment
|
||||
|
||||
import os
|
||||
|
||||
class SystemcverificationConan(ConanFile):
|
||||
name = "SystemCVerification"
|
||||
version = "2.0.0a"
|
||||
folder = "scv-2.0.0a-20161019"
|
||||
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 = {"stdcxx":[98,11,14]}
|
||||
default_options = "stdcxx=98"
|
||||
generators = "txt"
|
||||
exports_sources = "scv-2.0.0a-20161019/*"
|
||||
generators = "gcc"
|
||||
source_subfolder = "scv-2.0.1"
|
||||
exports_sources = "scv-2.0.1/*"
|
||||
requires = "SystemC/2.3.2@minres/stable"
|
||||
|
||||
def configure(self):
|
||||
self.options["SystemC"].stdcxx = self.options.stdcxx
|
||||
|
||||
# Maybe in windows we know that OpenSSL works better as shared (false)
|
||||
#if self.settings.os == "Windows":
|
||||
# self.options["OpenSSL"].shared = True
|
||||
|
||||
# Or adjust any other available option
|
||||
# self.options["Poco"].other_option = "foo"
|
||||
|
||||
def build(self):
|
||||
env_build = AutoToolsBuildEnvironment(self)
|
||||
if self.options.stdcxx == "14":
|
||||
env_build.cxx_flags = "-std=c++14"
|
||||
env_build.cxx_flags = "-std=gnu++14"
|
||||
elif self.options.stdcxx == "11":
|
||||
env_build.cxx_flags = "-std=c++11"
|
||||
env_build.cxx_flags = "-std=gnu++11"
|
||||
elif self.options.stdcxx == "98":
|
||||
env_build.cxx_flags = "-std=c++98"
|
||||
#env_build.libs.append("pthread")
|
||||
#env_build.defines.append("NEW_DEFINE=23")
|
||||
|
||||
self.output.info(env_build.vars)
|
||||
with tools.environment_append(env_build.vars):
|
||||
self.run("cd %s && mkdir _build" % self.folder)
|
||||
configure_command = 'cd %s/_build && env && ../configure --prefix=%s/_install --with-systemc=%s --disable-debug --disable-opt'
|
||||
self.output.info(configure_command % (self.folder, self.build_folder, self.deps_cpp_info["SystemC"].rootpath))
|
||||
self.run(configure_command % (self.folder, self.build_folder, self.deps_cpp_info["SystemC"].rootpath))
|
||||
self.run("cd %s/_build && make -j && make install" % self.folder)
|
||||
env_build.cxx_flags = "-std=gnu++98"
|
||||
env_build.fpic = True
|
||||
tools.mkdir("build")
|
||||
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,
|
||||
'--disable-debug',
|
||||
'--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)
|
||||
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)
|
||||
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"]
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
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"
|
|
@ -1,18 +1,28 @@
|
|||
from conans import ConanFile, CMake
|
||||
import os
|
||||
import pprint
|
||||
|
||||
class SystemcverificationTestConan(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {"stdcxx":[98,11,14]}
|
||||
default_options = "stdcxx=98"
|
||||
generators = "cmake"
|
||||
requires = "SystemC/2.3.2@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'
|
||||
|
||||
def build(self):
|
||||
cxxstd = self.options["SystemC"].stdcxx
|
||||
cmake = CMake(self)
|
||||
# Current dir is "test_package/build/<build_id>" and CMakeLists.txt is in "test_package"
|
||||
cmake.configure(source_dir=self.conanfile_directory, build_dir="./")
|
||||
#cmake.build()
|
||||
self.run('cmake %s %s -DCMAKE_CXX_STANDARD=%s' % (self.conanfile_directory, cmake.command_line, cxxstd))
|
||||
self.run("cmake --build . %s" % cmake.build_config)
|
||||
cmake.configure(
|
||||
args=[
|
||||
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx
|
||||
])
|
||||
cmake.build()
|
||||
|
||||
def imports(self):
|
||||
self.copy("*.dll", dst="bin", src="bin")
|
||||
|
|
Loading…
Reference in New Issue