update to latest SCC

This commit is contained in:
Eyck Jentzsch 2021-03-13 14:57:31 +01:00
parent 27f4e93027
commit f1a15fa4cb
6 changed files with 6 additions and 82 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "sc-components"]
path = sc-components
url = https://git.minres.com/SystemC/SystemC-Components.git
url = https://github.com/Minres/SystemC-Components.git

View File

@ -1,22 +1,13 @@
cmake_minimum_required(VERSION 3.3)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/sc-components/cmake)
project(pysysc-sc)
set(ENABLE_SCV TRUE CACHE BOOL "Enable use of SCV")
set(ENABLE_SHARED TRUE CACHE BOOL "Build shared libraries")
include(GitFunctions)
get_branch_from_git()
### set the directory names of the submodules
set(GIT_SUBMODULES sc-components)
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(GIT_SUBMODULE_BRANCH_sc-components ${GIT_BRANCH})
include(GNUInstallDirs)
include(Submodules)
include(Conan)
include(BuildType)
@ -48,8 +39,8 @@ endif()
setup_conan()
# 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.
#find_package(Boost COMPONENTS program_options filesystem system thread REQUIRED)
set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
find_package(Boost COMPONENTS program_options system thread REQUIRED)
# set-up SystemC and SCV
find_package(OSCISystemC)

View File

@ -1,20 +0,0 @@
# Function to link between sub-projects
function(add_dependent_subproject subproject_name)
#if (NOT TARGET ${subproject_name}) # target unknown
if(NOT PROJECT_${subproject_name}) # var unknown because we build only this subproject
find_package(${subproject_name} CONFIG REQUIRED)
else () # we know the target thus we are doing a build from the top directory
include_directories(../${subproject_name}/incl)
endif ()
endfunction(add_dependent_subproject)
# Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
get_directory_property(hasParent PARENT_DIRECTORY)
if(hasParent)
set(PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
endif()
# Function to link between sub-projects
function(add_dependent_header subproject_name)
include_directories(../${subproject_name}/incl)
endfunction(add_dependent_header)

View File

@ -1,45 +0,0 @@
macro(setup_conan)
find_program(conan conan)
if(NOT EXISTS ${conan})
message(FATAL_ERROR "Conan is required. Please see README.md")
return()
endif()
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL Darwin)
set(os Macos)
else()
set(os ${CMAKE_HOST_SYSTEM_NAME})
endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
set(compiler gcc)
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL AppleClang)
set(compiler apple-clang)
else()
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
endif()
string(SUBSTRING ${CMAKE_CXX_COMPILER_VERSION} 0 3 compiler_version)
set(conanfile ${CMAKE_SOURCE_DIR}/conanfile.txt)
set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
set(compiler_libcxx libstdc++11)
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CONAN_BUILD_TYPE Debug)
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
set(CONAN_BUILD_TYPE Release)
else()
set(CONAN_BUILD_TYPE ${CMAKE_BUILD_TYPE})
endif()
execute_process(COMMAND ${conan} install --build=missing
-s build_type=${CONAN_BUILD_TYPE} -s compiler.libcxx=${compiler_libcxx}
${CMAKE_SOURCE_DIR} RESULT_VARIABLE return_code)
if(NOT ${return_code} EQUAL 0)
message(FATAL_ERROR "conan install command failed.")
endif()
include(${conanfile_cmake})
conan_basic_setup()
endmacro()

View File

@ -1,7 +1,6 @@
[requires]
fmt/5.2.1@bincrafters/stable
SystemC/2.3.3@minres/stable
#SystemC-CCI/1.0.0@minres/stable
[generators]
cmake
@ -10,4 +9,3 @@ cmake
fmt:header_only=True
SystemC:stdcxx=11
SystemC:shared=True
#SystemC-CCI:stdcxx=11

@ -1 +1 @@
Subproject commit 2d83649df082540eb37fa03b8658f08361addda8
Subproject commit 385eed07957bed93669ae6c453d706414e95aebc