forked from zeidk/enpm702_fall2024
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
32 lines (23 loc) · 944 Bytes
/
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
cmake_minimum_required(VERSION 3.20.0)
project(lecture8 VERSION 0.1.0)
# Compilation flags
add_compile_options(-Wall)
include_directories(lecture8/include)
# Add executable
add_executable(lecture8
lecture8/src/main.cpp lecture8/src/date.cpp lecture8/src/engine.cpp
lecture8/src/driver.cpp
lecture8/src/vehicle.cpp)
# add_custom_command(TARGET lecture8 POST_BUILD
# COMMAND valgrind --show-error-list=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ./lecture8
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# COMMENT "Running Valgrind after building lecture8"
# VERBATIM
# )
# add_custom_target(run_valgrind ALL
# COMMAND valgrind --show-error-list=yes --leak-check=full --show-leak-kinds=all --track-origins=yes ./lecture8
# DEPENDS lecture8
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# )
# Set C++ standard to C++17
set_property(TARGET lecture8 PROPERTY CXX_STANDARD 17)