forked from NYU-Processor-Design/onboarding-lab-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (46 loc) · 1.64 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
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.25)
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
include(FetchContent)
FetchContent_Declare(
vcpkg
GIT_REPOSITORY https://github.com/microsoft/vcpkg.git
GIT_TAG master
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(vcpkg)
set(CMAKE_TOOLCHAIN_FILE
${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake
CACHE FILEPATH "Vcpkg toolchain file"
)
set(VCPKG_ROOT_DIR ${vcpkg_SOURCE_DIR} CACHE PATH "Vcpkg Root Directory")
endif()
if(DEFINED VCPKG_ROOT_DIR)
add_custom_target(UpdateVcpkgBaseline
${VCPKG_ROOT_DIR}/vcpkg x-update-baseline
)
endif()
project(week-three-lab)
enable_testing()
find_package(nyu-cmake CONFIG REQUIRED)
add_executable(exercise1 dv/exercise1.cpp)
target_compile_features(exercise1 PRIVATE cxx_std_20)
nyu_add_sv(exercise1 rtl/Exercise1.sv)
nyu_target_verilate(exercise1 TOP_MODULES Exercise1)
add_test(NAME exercise1 COMMAND exercise1)
add_executable(exercise2 dv/exercise2.cpp)
target_compile_features(exercise2 PRIVATE cxx_std_20)
nyu_add_sv(exercise2 rtl/Exercise2.sv)
nyu_target_verilate(exercise2 TOP_MODULES Exercise2)
add_test(NAME exercise2 COMMAND exercise2)
add_executable(exercise3 dv/exercise3.cpp)
target_compile_features(exercise3 PRIVATE cxx_std_20)
nyu_add_sv(exercise3
rtl/Exercise3.sv rtl/Mysteries/Mystery1.sv rtl/Mysteries/Mystery2.sv
)
nyu_target_verilate(exercise3 TOP_MODULES Exercise3)
add_test(NAME exercise3 COMMAND exercise3)
add_executable(exercise4 dv/exercise4.cpp)
target_compile_features(exercise4 PRIVATE cxx_std_20)
nyu_add_sv(exercise4 rtl/Exercise4.sv)
nyu_target_verilate(exercise4 TOP_MODULES Exercise4)
add_test(NAME exercise4 COMMAND exercise4)