-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
36 lines (27 loc) · 943 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
32
33
34
35
36
# Specify the minimum required version of CMake for this project.
cmake_minimum_required(VERSION 3.14)
project(AUT_AP_2024_Spring_HW2)
# Set the C++ standard to C++23 and make it a required standard.
# If the compiler does not support C++23, CMake will produce an error.
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(GTest REQUIRED)
include_directories(include/)
add_executable(main
src/main.cpp
src/Bank.cpp
src/Account.cpp
src/Person.cpp
src/Utils.cpp
src/unit_test.cpp
)
# Set compiler flags for C++.
# -Wall, -Wextra, -Werror, and -Wpedantic are used for stricter warnings and error handling.
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wpedantic")
# Set compiler flags specific to the Release build type.
# -O3 enables high-level optimizations.
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
target_link_libraries(main
GTest::GTest
GTest::Main
)