blob: fe592e36ff0bb329dfca12f63234aa3fe32d3503 (
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
38
39
40
|
--- test/CMakeLists.txt.orig 2023-05-22 11:33:56 UTC
+++ test/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS FALSE)
@@ -25,14 +25,14 @@ ELSE ()
ENDIF ()
# Google Test and Mock
-set(GMOCK_DIR gmock-1.11.0)
-add_library(gmock STATIC
- ${GMOCK_DIR}/gmock-gtest-all.cc
- ${GMOCK_DIR}/gmock/gmock.h
- ${GMOCK_DIR}/gtest/gtest.h
-)
-target_include_directories(gmock PUBLIC SYSTEM ${GMOCK_DIR})
-target_link_libraries(gmock PRIVATE ${CMAKE_THREAD_LIBS_INIT})
+# set(GMOCK_DIR gmock-1.11.0)
+# add_library(gmock STATIC
+# ${GMOCK_DIR}/gmock-gtest-all.cc
+# ${GMOCK_DIR}/gmock/gmock.h
+# ${GMOCK_DIR}/gtest/gtest.h
+# )
+# target_include_directories(gmock PUBLIC SYSTEM ${GMOCK_DIR})
+# target_link_libraries(gmock PRIVATE ${CMAKE_THREAD_LIBS_INIT})
# test targets
@@ -43,7 +43,7 @@ configure_file(${CARES_TOPLEVEL_DIR}/src/lib/ares_conf
add_executable(arestest ${TESTSOURCES} ${TESTHEADERS})
target_include_directories(arestest PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-target_link_libraries(arestest PRIVATE caresinternal gmock)
+target_link_libraries(arestest PRIVATE caresinternal gtest gmock)
IF (CARES_BUILD_CONTAINER_TESTS)
target_compile_definitions(arestest PRIVATE HAVE_USER_NAMESPACE HAVE_UTS_NAMESPACE)
|