From 8ea696387a09683bf38d744c4c08f5656dd948a8 Mon Sep 17 00:00:00 2001 From: tmarcero Date: Fri, 27 Oct 2023 10:23:49 +0200 Subject: [PATCH] Check if a custom version of SystemC is used and update CMake tests --- CMakeLists.txt | 15 +++++++-------- report/CMakeLists.txt | 15 +++++++++------ tlm_extensions/initiator_id/CMakeLists.txt | 14 ++++++++------ tlm_extensions/path_trace/CMakeLists.txt | 14 ++++++++------ 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee2eeb7..19e240e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,14 +20,13 @@ include(${cpm-cmake_SOURCE_DIR}/cmake/CPM.cmake) cpmaddpackage("${GITHUB}TheLartians/PackageProject.cmake.git@1.4.1") -cpmaddpackage( - NAME SystemCLanguage - GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git - GIT_SHALLOW True - GIT_TAG master -) -if(SystemCLanguage_ADDED) -set(SystemCLanguage_FOUND TRUE) +if (NOT SystemCLanguageLocal_FOUND) + cpmaddpackage( + NAME SystemCLanguage + GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git + GIT_SHALLOW True + GIT_TAG main + ) endif() cpmaddpackage( diff --git a/report/CMakeLists.txt b/report/CMakeLists.txt index 1df5317..f54ac04 100644 --- a/report/CMakeLists.txt +++ b/report/CMakeLists.txt @@ -20,12 +20,14 @@ include(${cpm-cmake_SOURCE_DIR}/cmake/CPM.cmake) cpmaddpackage("${GITHUB}TheLartians/PackageProject.cmake.git@1.4.1") -cpmaddpackage( - NAME SystemCLanguage - GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git - GIT_SHALLOW True - GIT_TAG master -) +if (NOT SystemCLanguageLocal_FOUND) + cpmaddpackage( + NAME SystemCLanguage + GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git + GIT_SHALLOW True + GIT_TAG main + ) +endif() cpmaddpackage( NAME @@ -42,6 +44,7 @@ cpmaddpackage( "RAPIDJSON_BUILD_EXAMPLES OFF") set(RapidJSON_DIR "${RapidJSON_BINARY_DIR}") +set(RAPIDJSON_INCLUDE_DIRS "${RapidJSON_SOURCE_DIR}/include") cpmaddpackage( NAME SystemCCCI diff --git a/tlm_extensions/initiator_id/CMakeLists.txt b/tlm_extensions/initiator_id/CMakeLists.txt index 446e6d7..bc8855d 100644 --- a/tlm_extensions/initiator_id/CMakeLists.txt +++ b/tlm_extensions/initiator_id/CMakeLists.txt @@ -20,12 +20,14 @@ include(${cpm-cmake_SOURCE_DIR}/cmake/CPM.cmake) cpmaddpackage("${GITHUB}TheLartians/PackageProject.cmake.git@1.4.1") -cpmaddpackage( - NAME SystemCLanguage - GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git - GIT_SHALLOW True - GIT_TAG master -) +if (NOT SystemCLanguageLocal_FOUND) + cpmaddpackage( + NAME SystemCLanguage + GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git + GIT_SHALLOW True + GIT_TAG main + ) +endif() add_library(${PROJECT_NAME} INTERFACE) diff --git a/tlm_extensions/path_trace/CMakeLists.txt b/tlm_extensions/path_trace/CMakeLists.txt index a105a95..5841b25 100644 --- a/tlm_extensions/path_trace/CMakeLists.txt +++ b/tlm_extensions/path_trace/CMakeLists.txt @@ -20,12 +20,14 @@ include(${cpm-cmake_SOURCE_DIR}/cmake/CPM.cmake) cpmaddpackage("${GITHUB}TheLartians/PackageProject.cmake.git@1.4.1") -cpmaddpackage( - NAME SystemCLanguage - GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git - GIT_SHALLOW True - GIT_TAG master -) +if (NOT SystemCLanguageLocal_FOUND) + cpmaddpackage( + NAME SystemCLanguage + GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git + GIT_SHALLOW True + GIT_TAG main + ) +endif() add_library(${PROJECT_NAME} INTERFACE)