-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
73 lines (57 loc) · 1.88 KB
/
CMakeLists.txt
File metadata and controls
73 lines (57 loc) · 1.88 KB
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
73
cmake_minimum_required(VERSION 3.13)
project(NetSim)
set(CMAKE_CXX_STANDARD 17)
add_compile_options(-Wall -Wextra -Werror -Wpedantic -pedantic-errors -Werror=switch)
include_directories(
include
)
#Add the google test subdirectory
add_subdirectory(NetSim_test/lib)
#include googletest/include dir
#include_directories(NetSim_tests/lib/googletest/include)
#include the googlemock/include dir
#include_directories(NetSim_tests/lib/googlemock/include)
##Define your executable
#add_executable(EXECUTABLE_NAME ${SOURCE_FILES})
#
##Link with GoogleTest
#target_link_libraries(EXECUTABLE_NAME gtest gtest_main)
#
##Link with GoogleMock
#target_link_libraries(EXECUTABLE_NAME gmock gmock_main)
set(SOURCE_FILES
include/types.hpp
include/package.hpp
include/storage_types.hpp
include/nodes.hpp
include/helpers.hpp
include/factory.hpp
include/reports.hpp
include/simulation.hpp
src/package.cpp
src/storage_types.cpp
src/nodes.cpp
src/factory.cpp
src/helpers.cpp
src/reports.cpp
src/simulation.cpp
)
#add_executable(my_project_debug ${SOURCE_FILES} main.cpp)
set(SOURCES_FILES_TESTS
NetSim_test/tests/test_Factory
NetSim_test/tests/test_factory_io.cpp
NetSim_test/tests/test_nodes.cpp
NetSim_test/tests/test_package.cpp
NetSim_test/tests/test_storage_types.cpp
NetSim_test/tests/test_reports.cpp
NetSim_test/tests/test_simulate.cpp
)
add_executable(NetSim_test ${SOURCE_FILES} ${SOURCES_FILES_TESTS} NetSim_test/tests/main_gtest.cpp)
target_include_directories(NetSim_test PUBLIC
NetSim_test/lib/googlemock/include
NetSim_test/lib/googletest/include
NetSim_test/mocks
)
#add_subdirectory(NetSim_tests/lib)
target_link_libraries(NetSim_test gmock)
add_executable(NetSim ${SOURCE_FILES})