diff --git a/CMakeLists.txt b/CMakeLists.txt index f37ed7686..442435d80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_BINARY_DIR}) # project specific cmake dir cmake_policy(SET CMP0077 NEW) diff --git a/TESTING.md b/TESTING.md index dd45690d6..316ee522b 100644 --- a/TESTING.md +++ b/TESTING.md @@ -1,10 +1,11 @@ # Running Tests -This repository has a GoogleTest-based suite (see `tests/`). The tests target the CMake option `BUILD_TESTING=ON` and require the same dependencies as the main build plus GoogleTest (fetched automatically via `FetchContent`). +This repository has a Catch2 based test suite (see `tests/`). +The tests target the CMake option `BUILD_TESTING=ON` and require the same dependencies as the main build plus Catch2. ## Prerequisites -- CMake ≥ 3.20 +- CMake ≥ 3.24 - A C++ compiler (GCC/Clang) with C++17 or later - Ninja build system - Python 3 with `conan` installed. A virtual environment is recommended: diff --git a/cmake/scc-config.cmake.in b/cmake/scc-config.cmake.in index 2341b0a14..617bddfab 100644 --- a/cmake/scc-config.cmake.in +++ b/cmake/scc-config.cmake.in @@ -2,10 +2,10 @@ include(CMakeFindDependencyMacro) find_dependency(SystemCLanguage) +find_dependency(RapidJSON) find_dependency(lwtr) find_dependency(fstapi) -find_dependency(boost_filesystem @MIN_BOOST_VERSION@) -find_dependency(boost_date_time @MIN_BOOST_VERSION@) +find_dependency(Boost COMPONENTS date_time filesystem) find_dependency(spdlog) find_dependency(lz4) find_dependency(fmt) @@ -20,7 +20,11 @@ if(NOT TARGET scc::scc) include("${CMAKE_CURRENT_LIST_DIR}/components-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/interfaces-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/scc-targets.cmake") + if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/scc-shared-targets.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/scc-shared-targets.cmake") + endif() endif() set(scc_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include") set(scc_LIBRARIES scc::scc) +check_required_components(scc) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index d6817e22a..62309c4b8 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -82,10 +82,11 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/nonstd COMPONENT util DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # target directory FILES_MATCHING # install only matched files PATTERN "*.h" # select header files + PATTERN "*.hpp" # select header files ) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/rigtorp COMPONENT util DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # target directory FILES_MATCHING # install only matched files PATTERN "*.h" # select header files ) - \ No newline at end of file + diff --git a/third_party/axi_chi b/third_party/axi_chi index a19719154..ea96cfd54 160000 --- a/third_party/axi_chi +++ b/third_party/axi_chi @@ -1 +1 @@ -Subproject commit a19719154bed4b3858605a4b3d76086dbaaa593e +Subproject commit ea96cfd54c9fe588ee2d090e97e5ccb56c83e927 diff --git a/third_party/cci-1.0.1/cciapi-config.cmake.in b/third_party/cci-1.0.1/cciapi-config.cmake.in index c6cd6a752..b590aca4d 100644 --- a/third_party/cci-1.0.1/cciapi-config.cmake.in +++ b/third_party/cci-1.0.1/cciapi-config.cmake.in @@ -2,9 +2,26 @@ include(CMakeFindDependencyMacro) find_dependency(RapidJSON) -if(NOT TARGET cciapi::cciapi) +if(NOT TARGET cciapi) include("${CMAKE_CURRENT_LIST_DIR}/cciapi-targets.cmake") endif() +if(NOT TARGET systemc-cci::systemc-cci) + add_library(systemc-cci::systemc-cci INTERFACE IMPORTED) + set_property(TARGET systemc-cci::systemc-cci PROPERTY INTERFACE_LINK_LIBRARIES cciapi) +endif() +if(NOT TARGET SystemC::cci) + add_library(SystemC::cci INTERFACE IMPORTED) + set_property(TARGET SystemC::cci PROPERTY INTERFACE_LINK_LIBRARIES cciapi) +endif() +if(NOT TARGET cci) + add_library(cci INTERFACE IMPORTED) + set_property(TARGET cci PROPERTY INTERFACE_LINK_LIBRARIES cciapi) +endif() +if(NOT TARGET cciapi::cciapi) + add_library(cciapi::cciapi INTERFACE IMPORTED) + set_property(TARGET cciapi::cciapi PROPERTY INTERFACE_LINK_LIBRARIES cciapi) +endif() + set(cciapi_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include") -set(cciapi_lIBRARIES cciapi::cciapi) +set(cciapi_LIBRARIES cciapi::cciapi) diff --git a/third_party/fst/fstapi-config.cmake.in b/third_party/fst/fstapi-config.cmake.in index b940750a8..dc2485c65 100644 --- a/third_party/fst/fstapi-config.cmake.in +++ b/third_party/fst/fstapi-config.cmake.in @@ -4,9 +4,9 @@ include(CMakeFindDependencyMacro) find_dependency(lz4) find_dependency(ZLIB) -if(NOT TARGET scc::scc) +if(NOT TARGET fstapi) include("${CMAKE_CURRENT_LIST_DIR}/fstapi-targets.cmake") endif() -set(fst_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include") -set(fst_lIBRARIES fst::fst) \ No newline at end of file +set(fstapi_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include") +set(fstapi_LIBRARIES fstapi) diff --git a/third_party/lwtr4sc b/third_party/lwtr4sc index 1aead39df..0a763f7da 160000 --- a/third_party/lwtr4sc +++ b/third_party/lwtr4sc @@ -1 +1 @@ -Subproject commit 1aead39df76f12bbee9e5f7ff9e1db9d7cbcbb52 +Subproject commit 0a763f7da6424c01e7696d45ff9740ef6f87ff7f diff --git a/third_party/scv-tr/src/scv-tr-config.cmake.in b/third_party/scv-tr/src/scv-tr-config.cmake.in index 8602f1ff2..9977f83f9 100644 --- a/third_party/scv-tr/src/scv-tr-config.cmake.in +++ b/third_party/scv-tr/src/scv-tr-config.cmake.in @@ -1,8 +1,10 @@ @PACKAGE_INIT@ +include(CMakeFindDependencyMacro) if(NOT TARGET scv-tr) + find_dependency(fmt) include("${CMAKE_CURRENT_LIST_DIR}/scv-tr-targets.cmake") endif() -set(tlm-interfaces_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include") -set(tlm-interfaces_lIBRARIES lwtr::lwtr) \ No newline at end of file +set(scv-tr_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include") +set(scv-tr_LIBRARIES scv-tr)