-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathCMakeLists.txt
42 lines (31 loc) · 1.36 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
#******************************************************************************
# Copyright (c) 2020, Intel Corporation. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
#
# *****************************************************************************
cmake_minimum_required(VERSION 3.12)
enable_testing()
if(NOT DEFINED ENV{ICSC_HOME})
message("ICSC_HOME is not defined!")
return()
endif()
# Design template
project(mydesign)
## SVC package contains ScTool and SystemC libraries
find_package(SVC REQUIRED)
# C++ standard must be the same as in ScTool, $(SystemC_CXX_STANDARD) contains 17
set(CMAKE_CXX_STANDARD 17)
#include_directories($ENV{ICSC_HOME}/include)
# All synthesizable source files must be listed here (not in libraries)
add_executable(mydesign example.cpp)
# Add compilation options
# target_compile_definitions(mydesign PUBLIC -DMYOPTION)
# target_compile_options(mydesign PUBLIC -Wall)
# Add optional library, do not add SystemC library (it added by svc_target)
#target_link_libraries(mydesign sometestbenchlibrary)
# svc_target will create @mydesign_sctool executable that runs code generation
# and @mydesign that runs general SystemC simulation
# ELAB_TOP parameter accepts hierarchical name of DUT
# (that is SystemC name, returned by sc_object::name() method)
svc_target(mydesign INIT_LOCAL_VARS ELAB_TOP tb.dut_inst)