Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / rapidjson / 0000-unstable-use-nixpkgs-gtest.patch
blobdf334cc9126426d81bf4b22b114af06ea71818d1
1 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
2 index 11c1b04c..762eaa75 100644
3 --- a/test/CMakeLists.txt
4 +++ b/test/CMakeLists.txt
5 @@ -1,20 +1,14 @@
6 -find_package(GTestSrc)
7 +enable_testing()
9 -IF(GTESTSRC_FOUND)
10 - enable_testing()
11 +if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW))
12 + set(gtest_disable_pthreads ON)
13 + set(gtest_force_shared_crt ON)
14 +endif()
16 - if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW))
17 - set(gtest_disable_pthreads ON)
18 - set(gtest_force_shared_crt ON)
19 - endif()
20 +include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
22 - add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest)
23 - include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
24 +set(TEST_LIBRARIES gtest gtest_main)
26 - set(TEST_LIBRARIES gtest gtest_main)
28 - add_custom_target(tests ALL)
29 - add_subdirectory(perftest)
30 - add_subdirectory(unittest)
32 -ENDIF(GTESTSRC_FOUND)
33 +add_custom_target(tests ALL)
34 +add_subdirectory(perftest)
35 +add_subdirectory(unittest)