-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
33 lines (22 loc) · 857 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
cmake_minimum_required(VERSION 3.18)
project(GA)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG main # release-1.10.0
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
add_library(SRC STATIC src/Alarm.cpp src/Message.cpp src/Application.cpp src/Tag.cpp)
enable_testing()
add_executable(${PROJECT_NAME} src/main.cpp )
add_executable(${PROJECT_NAME}-ut src/test.cpp )
target_link_libraries(${PROJECT_NAME} SRC )
target_link_libraries(${PROJECT_NAME}-ut gtest_main)
include(GoogleTest)
gtest_discover_tests(${PROJECT_NAME}-ut)