-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (40 loc) · 1.17 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
cmake_minimum_required(VERSION 3.10)
project(UPI)
# set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Include directories
include_directories(include)
# Source files
# file(GLOB_RECURSE SOURCES "src/*.cpp")
set(SOURCES
src/main.cpp
src/cli.cpp
src/filesystem_scanner.cpp
src/conflict_analyzer.cpp
src/report_generator.cpp
src/package_manager/package_manager_base.cpp
src/package_manager/dpkg_adapter.cpp
src/package_manager/rpm_adapter.cpp
src/package_manager/dnf_adapter.cpp
src/package_manager/flatpak_adapter.cpp
src/package_manager/snap_adapter.cpp
src/package_manager/pip_adapter.cpp
)
# Executable
add_executable(upi ${SOURCES})
# Google Test setup
enable_testing()
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
# Test executable
file(GLOB_RECURSE TEST_SOURCES "tests/*.cpp")
add_executable(upi_tests
${TEST_SOURCES}
${SOURCES})
# Link Google Test libraries
target_link_libraries(upi_tests ${GTEST_LIBRARIES} pthread)
# Add tests
add_test(NAME AllTests COMMAND upi_tests)
# Link libraries (if needed)
# target_link_libraries(upi ...)