-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (22 loc) · 818 Bytes
/
CMakeLists.txt
File metadata and controls
30 lines (22 loc) · 818 Bytes
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
cmake_minimum_required (VERSION 3.10)
project ("wb-uart")
# Uncomment to build Test files
SET(ENABLE_TESTS TRUE)
# set to cpp 11 standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Define Necessary Verilator Core Files
# Find the Verilator Package and add necessary Definitions
find_package(verilator HINTS $ENV{VERILATOR_ROOT})
set(VERILATOR_INCLUDE "/usr/share/verilator/include")
set(RTL "${CMAKE_SOURCE_DIR}/rtl")
# Add the Verilator Include path to the include search directory
include_directories(
"${VERILATOR_INCLUDE}" # verilator core files
"${CMAKE_SOURCE_DIR}/bench/cpp") # include directory for testbench
# build examples
INCLUDE("cmake/examples.cmake")
IF(${ENABLE_TESTS})
enable_testing()
INCLUDE("cmake/tests.cmake")
ENDIF()