From f1a15fa4cbd50724a6f04a1bab998857f5eec7b8 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 13 Mar 2021 14:57:31 +0100 Subject: [PATCH] update to latest SCC --- .gitmodules | 2 +- CMakeLists.txt | 17 ++++------------- cmake/Common.cmake | 20 -------------------- cmake/Conan.cmake | 45 --------------------------------------------- conanfile.txt | 2 -- sc-components | 2 +- 6 files changed, 6 insertions(+), 82 deletions(-) delete mode 100644 cmake/Common.cmake delete mode 100644 cmake/Conan.cmake diff --git a/.gitmodules b/.gitmodules index 73349ab..fbca556 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index f2a1484..b27b8d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/Common.cmake b/cmake/Common.cmake deleted file mode 100644 index 673ec59..0000000 --- a/cmake/Common.cmake +++ /dev/null @@ -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) diff --git a/cmake/Conan.cmake b/cmake/Conan.cmake deleted file mode 100644 index 5bd9930..0000000 --- a/cmake/Conan.cmake +++ /dev/null @@ -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() diff --git a/conanfile.txt b/conanfile.txt index 92ae706..9c5e086 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -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 diff --git a/sc-components b/sc-components index 2d83649..385eed0 160000 --- a/sc-components +++ b/sc-components @@ -1 +1 @@ -Subproject commit 2d83649df082540eb37fa03b8658f08361addda8 +Subproject commit 385eed07957bed93669ae6c453d706414e95aebc