-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
72 lines (60 loc) · 1.58 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required(VERSION 3.10)
project(CGPA_Calculator_Project)
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
# Disable cpplint for SQLiteCpp
set(SQLITECPP_RUN_CPPLINT OFF)
# Add subdirectory for SQLiteCpp
add_subdirectory(external/SQLiteCpp)
# Include directories
include_directories(external/SQLiteCpp/include)
include_directories(external/SQLiteCpp/sqlite3)
include_directories(src)
# Add the executable
add_executable(CGPA_Calculator_Main
src/main.cpp
src/Course.cpp
src/Student.cpp
src/Database.cpp
src/Menu.cpp
src/StudentOperations.cpp
)
# Link SQLiteCpp to your target
target_link_libraries(CGPA_Calculator_Main PRIVATE SQLiteCpp)
# Add the test executables
# add_executable(TestMain
# test/TestMain.cpp
# src/Course.cpp
# src/FileManager.cpp
# src/Student.cpp
# )
# add_executable(TestCourse
# test/TestCourse.cpp
# src/Course.cpp
# src/FileManager.cpp
# src/Student.cpp
# )
# add_executable(TestFileManager
# test/TestFileManager.cpp
# src/Course.cpp
# src/FileManager.cpp
# src/Student.cpp
# )
# add_executable(TestStudent
# test/TestStudent.cpp
# src/Course.cpp
# src/FileManager.cpp
# src/Student.cpp
# )
# Link SQLiteCpp to test targets
# target_link_libraries(TestMain PRIVATE SQLiteCpp)
# target_link_libraries(TestCourse PRIVATE SQLiteCpp)
# target_link_libraries(TestFileManager PRIVATE SQLiteCpp)
# target_link_libraries(TestStudent PRIVATE SQLiteCpp)
# Set necessary policies
if (POLICY CMP0079)
cmake_policy(SET CMP0079 NEW)
endif()
if (POLICY CMP0002)
cmake_policy(SET CMP0002 NEW)
endif()