diff --git a/.cproject b/.cproject index d31d49e..95e64ad 100644 --- a/.cproject +++ b/.cproject @@ -19,7 +19,7 @@ - + @@ -58,6 +58,7 @@ + @@ -273,6 +274,29 @@ true true + + CMAKE_BUILD_TOOL + $<cmake4eclipse_dyn> + all + true + true + true + + + make + VERBOSE=1 + true + false + true + + + CMAKE_BUILD_TOOL + $<cmake4eclipse_dyn> + clean + true + true + true + - + \ No newline at end of file diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 57bac22..40620f1 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -18,7 +18,7 @@ - + @@ -30,7 +30,7 @@ - + @@ -43,7 +43,7 @@ - + diff --git a/CMakeLists.txt b/CMakeLists.txt index 01d06c6..16659c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.12) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}) +list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}) project(SCC_Test) @@ -16,20 +18,16 @@ get_info_from_git() ### set the directory names of the submodules set(GIT_SUBMODULES scc) set(GIT_SUBMODULE_DIR_sc-components .) -### set each submodules's commit or tag that is to be checked out -### (leave empty if you want master) -#set(GIT_SUBMODULE_VERSION_sc-components 3af6b9836589b082c19d9131c5d0b7afa8ddd7cd) +## set each submodules's commit or tag that is to be checked out +## (leave empty if you want master) set(GIT_SUBMODULE_BRANCH_sc-components ${GIT_BRANCH}) include(GNUInstallDirs) if(NOT NO_SUBMODULE_CHECK) include(Submodules) endif() -include(Conan) include(BuildType) -#enable_testing() - set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) @@ -75,7 +73,70 @@ else() endif() endif() -setup_conan(TARGETS) +########################################################## +## get conan packages +########################################################## +include(ConanInline) +conan_check() +conan_add_remote(NAME minres URL https://artifactory.minres.com/artifactory/api/conan/oss) + +# Boost on CentOS 7 quirks: the b2 of conan-center is build against a newer libstdc++ and therefore does not run +# with the oooooold libs on CentOS 7. Therefore we build our own version of b2 if it is not there +set(B2_META $ENV{HOME}/.conan/data/b2/4.5.0/_/_/metadata.json) +if(DEFINED ENV{CONAN_USER_HOME}) + set(B2_META $ENV{CONAN_USER_HOME}/.conan/data/b2/4.5.0/_/_/metadata.json) +endif() +if(NOT EXISTS ${B2_META}) + conan_cmake_configure(REQUIRES b2/4.5.0) + conan_cmake_autodetect(settings) + conan_cmake_install(PATH_OR_REFERENCE . BUILD b2 SETTINGS ${settings}) +endif() +# Boost on CentOS 7 quirks end + +set(CONAN_BOOST_OPTIONS +boost:fPIC=True +boost:shared=True +boost:header_only=False +boost:without_context=True +boost:without_contract=True +boost:without_coroutine=True +boost:without_fiber=True +boost:without_graph=True +boost:without_graph_parallel=True +boost:without_iostreams=True +boost:without_json=True +boost:without_locale=True +boost:without_log=True +boost:without_math=True +boost:without_mpi=True +boost:without_nowide=True +boost:without_python=True +boost:without_random=True +boost:without_regex=True +boost:without_stacktrace=True +boost:without_test=True +boost:without_timer=True +boost:without_type_erasure=True +boost:without_wave=True +) +set(CONAN_PACKAGE_LIST fmt/6.1.2 zlib/1.2.11 boost/1.75.0 gsl-lite/0.37.0) +set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) +if(NOT DEFINED ENV{SYSTEMC_HOME}) + set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 systemc-cci/1.0.0) + set(CONAN_PACKAGE_OPTIONS ${CONAN_PACKAGE_OPTIONS} systemc-cci:shared=False) +endif() +conan_cmake_configure(REQUIRES ${CONAN_PACKAGE_LIST} + GENERATORS cmake_find_package + OPTIONS ${CONAN_PACKAGE_OPTIONS} + ) + +conan_install() +find_package(fmt) +find_package(ZLIB) +find_package(gsl-lite) +find_package(SystemCLanguage) +find_package(systemc-cci) +######################################################################################## # This line finds the boost lib and headers. set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install. diff --git a/conanfile.txt b/conanfile.txt deleted file mode 100644 index 368105a..0000000 --- a/conanfile.txt +++ /dev/null @@ -1,15 +0,0 @@ -[requires] - fmt/6.1.2 - boost/1.75.0 - gsl-lite/0.37.0 - systemc/2.3.3 - #systemc-scv/2.0.1 - systemc-cci/1.0.0 - -[generators] - cmake - -[options] - fmt:header_only=True - systemc:shared=True - systemc-cci:shared=True \ No newline at end of file diff --git a/scc b/scc index 2a11251..e266bcb 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 2a11251ae63f3470245e13f4f576e4c93d2f243c +Subproject commit e266bcbeea7153136c689170ab9f466f13e96571