blob: 27d55040aa0449cad8ff36a40e94d72a0359e7c3 (
plain)
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
|
cmake_minimum_required(VERSION 3.14)
project(test_fastmouse)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
cmake_policy(SET CMP0135 NEW)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.16.0.zip
)
FetchContent_MakeAvailable(googletest)
file (GLOB SOURCE_FILES CONFIGURE_DEPENDS
"*.cc"
)
add_executable(${PROJECT_NAME}
${SOURCE_FILES}
)
target_compile_options(${PROJECT_NAME} PRIVATE
-Wall -Wextra -Wshadow -Wdouble-promotion -Wformat=2 -Wundef -fno-common
-Wconversion -Wpedantic -std=c++20 -O2
-Wno-exceptions
-Wno-missing-field-initializers -Wno-unknown-pragmas
)
target_link_libraries(${PROJECT_NAME} PRIVATE
GTest::gtest_main
)
enable_testing()
include(GoogleTest)
gtest_discover_tests(test_fastmouse)
|