forked from accellera-official/systemc-common-practices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (39 loc) · 1.08 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(scp VERSION 1.0 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to build all targets.")
set(GITHUB "https://github.com/" CACHE STRING "github base url")
include(FetchContent)
include(CTest)
FetchContent_Declare(
cpm-cmake
GIT_REPOSITORY ${GITHUB}cpm-cmake/CPM.cmake.git
GIT_SHALLOW True
GIT_TAG v0.31.1
)
FetchContent_MakeAvailable(cpm-cmake)
include(${cpm-cmake_SOURCE_DIR}/cmake/CPM.cmake)
cpmaddpackage("${GITHUB}TheLartians/[email protected]")
cpmaddpackage(
NAME SystemCLanguage
GIT_REPOSITORY ${GITHUB}accellera-official/systemc.git
GIT_SHALLOW True
GIT_TAG 2.3.3
)
cpmaddpackage(
NAME initiator_id
SOURCE_DIR ${PROJECT_SOURCE_DIR}/tlm_extensions/initiator_id
)
cpmaddpackage(
NAME path_trace
SOURCE_DIR ${PROJECT_SOURCE_DIR}/tlm_extensions/path_trace
)
cpmaddpackage(
NAME report
SOURCE_DIR ${PROJECT_SOURCE_DIR}/report
)
if("${PROJECT_NAME}" STREQUAL "${CMAKE_PROJECT_NAME}")
add_subdirectory(examples)
if(BUILD_TESTING)
enable_testing()
endif()
endif()