removes scc git submodule and adds as FetchContent
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/scc/cmake)
|
||||
cmake_policy(SET CMP0110 NEW)
|
||||
|
||||
project(SCC_Test)
|
||||
@@ -11,6 +10,22 @@ option(ENABLE_CLANG_FORMAT "Enable clang-format targets" OFF)
|
||||
option(THREAD_SANITIZER "Enable thread sanitizer TSan" OFF)
|
||||
option(ADDR_SANITIZER "Enable address sanitizer ASan" OFF)
|
||||
|
||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/scc")
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/scc/cmake)
|
||||
else()
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
scc_git
|
||||
GIT_REPOSITORY https://github.com/Minres/SystemC-Components.git
|
||||
GIT_TAG develop
|
||||
)
|
||||
FetchContent_GetProperties(scc_git)
|
||||
if(NOT scc_git_POPULATED)
|
||||
FetchContent_Populate(scc_git)
|
||||
endif()
|
||||
list(APPEND CMAKE_MODULE_PATH ${scc_git_SOURCE_DIR}/cmake)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(BuildType)
|
||||
|
||||
@@ -72,6 +87,11 @@ include(CTest)
|
||||
include(Catch)
|
||||
enable_testing()
|
||||
set(WITH_SCP4SCC ON)
|
||||
add_subdirectory(scc)
|
||||
|
||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/scc")
|
||||
add_subdirectory(scc)
|
||||
else()
|
||||
add_subdirectory(${scc_git_SOURCE_DIR})
|
||||
endif()
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
|
||||
Reference in New Issue
Block a user