mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
fe69ee86c8
Update gtest and gmock to fix clang compiler issues, as well as patch CMakeLists.txt in multiple places to fix other issues on macOS.
159 lines
4.7 KiB
Diff
159 lines
4.7 KiB
Diff
From eea85dbf4bbde545d8cb07d7ee9fbdca3dcf48fd Mon Sep 17 00:00:00 2001
|
|
From: Michael Hoang <enzime@users.noreply.github.com>
|
|
Date: Sat, 14 Jul 2018 22:07:39 +1000
|
|
Subject: [PATCH 1/2] Update gtest and gmock to version 1.7.0
|
|
|
|
Fixes compilation under clang on macOS as <tr1/tuple> is now found under
|
|
<tuple>.
|
|
---
|
|
CMakeLists.txt | 2 +-
|
|
ext/toolchain/commands1.py | 4 ++--
|
|
src/lib/platform/CMakeLists.txt | 2 +-
|
|
src/lib/server/CMakeLists.txt | 2 +-
|
|
src/lib/shared/CMakeLists.txt | 2 +-
|
|
src/lib/synergy/CMakeLists.txt | 2 +-
|
|
src/test/CMakeLists.txt | 12 ++++++------
|
|
src/test/integtests/CMakeLists.txt | 4 ++--
|
|
src/test/unittests/CMakeLists.txt | 4 ++--
|
|
9 files changed, 17 insertions(+), 17 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 94c474e8..2f37424d 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -178,7 +178,7 @@ if (UNIX)
|
|
CACHE STRING "" FORCE)
|
|
endif()
|
|
|
|
- set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
|
|
+ set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS}")
|
|
|
|
find_library(lib_ScreenSaver ScreenSaver)
|
|
find_library(lib_IOKit IOKit)
|
|
diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py
|
|
index f32ec483..bf997cf6 100644
|
|
--- a/ext/toolchain/commands1.py
|
|
+++ b/ext/toolchain/commands1.py
|
|
@@ -251,10 +251,10 @@ class InternalCommands:
|
|
macIdentity = None
|
|
|
|
# gtest dir with version number
|
|
- gtestDir = 'gtest-1.6.0'
|
|
+ gtestDir = 'gtest-1.7.0'
|
|
|
|
# gmock dir with version number
|
|
- gmockDir = 'gmock-1.6.0'
|
|
+ gmockDir = 'gmock-1.7.0'
|
|
|
|
win32_generators = {
|
|
1 : VisualStudioGenerator('10'),
|
|
diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt
|
|
index 481d8ef9..1ce67eca 100644
|
|
--- a/src/lib/platform/CMakeLists.txt
|
|
+++ b/src/lib/platform/CMakeLists.txt
|
|
@@ -31,7 +31,7 @@ endif()
|
|
|
|
include_directories(
|
|
../
|
|
- ../../../ext/gtest-1.6.0/include
|
|
+ ../../../ext/gtest-1.7.0/include
|
|
)
|
|
|
|
if (UNIX)
|
|
diff --git a/src/lib/server/CMakeLists.txt b/src/lib/server/CMakeLists.txt
|
|
index 3cb582ec..0525d627 100644
|
|
--- a/src/lib/server/CMakeLists.txt
|
|
+++ b/src/lib/server/CMakeLists.txt
|
|
@@ -24,7 +24,7 @@ endif()
|
|
include_directories(
|
|
../
|
|
../../../ext
|
|
- ../../../ext/gtest-1.6.0/include
|
|
+ ../../../ext/gtest-1.7.0/include
|
|
)
|
|
|
|
if (UNIX)
|
|
diff --git a/src/lib/shared/CMakeLists.txt b/src/lib/shared/CMakeLists.txt
|
|
index 891f4aa7..16c8b04a 100644
|
|
--- a/src/lib/shared/CMakeLists.txt
|
|
+++ b/src/lib/shared/CMakeLists.txt
|
|
@@ -25,7 +25,7 @@ add_library(shared STATIC ${sources})
|
|
include_directories(
|
|
../
|
|
../../../ext
|
|
- ../../../ext/gtest-1.6.0/include
|
|
+ ../../../ext/gtest-1.7.0/include
|
|
)
|
|
|
|
target_link_libraries(shared arch base)
|
|
diff --git a/src/lib/synergy/CMakeLists.txt b/src/lib/synergy/CMakeLists.txt
|
|
index 0972be8c..e19fcce5 100644
|
|
--- a/src/lib/synergy/CMakeLists.txt
|
|
+++ b/src/lib/synergy/CMakeLists.txt
|
|
@@ -36,7 +36,7 @@ endif()
|
|
include_directories(
|
|
../
|
|
../../../ext
|
|
- ../../../ext/gtest-1.6.0/include
|
|
+ ../../../ext/gtest-1.7.0/include
|
|
)
|
|
|
|
if (UNIX)
|
|
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
|
|
index 8812150a..04cdfc50 100644
|
|
--- a/src/test/CMakeLists.txt
|
|
+++ b/src/test/CMakeLists.txt
|
|
@@ -15,13 +15,13 @@
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
include_directories(
|
|
- ../../ext/gtest-1.6.0
|
|
- ../../ext/gtest-1.6.0/include
|
|
- ../../ext/gmock-1.6.0
|
|
- ../../ext/gmock-1.6.0/include)
|
|
+ ../../ext/gtest-1.7.0
|
|
+ ../../ext/gtest-1.7.0/include
|
|
+ ../../ext/gmock-1.7.0
|
|
+ ../../ext/gmock-1.7.0/include)
|
|
|
|
-add_library(gtest STATIC ../../ext/gtest-1.6.0/src/gtest-all.cc)
|
|
-add_library(gmock STATIC ../../ext/gmock-1.6.0/src/gmock-all.cc)
|
|
+add_library(gtest STATIC ../../ext/gtest-1.7.0/src/gtest-all.cc)
|
|
+add_library(gmock STATIC ../../ext/gmock-1.7.0/src/gmock-all.cc)
|
|
|
|
if (UNIX)
|
|
# ignore warnings in gtest and gmock
|
|
diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
|
|
index 2f1ca7f3..6ddbd29a 100644
|
|
--- a/src/test/integtests/CMakeLists.txt
|
|
+++ b/src/test/integtests/CMakeLists.txt
|
|
@@ -56,8 +56,8 @@ endif()
|
|
include_directories(
|
|
../../
|
|
../../lib/
|
|
- ../../../ext/gtest-1.6.0/include
|
|
- ../../../ext/gmock-1.6.0/include
|
|
+ ../../../ext/gtest-1.7.0/include
|
|
+ ../../../ext/gmock-1.7.0/include
|
|
)
|
|
|
|
if (UNIX)
|
|
diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
|
|
index 3e49dc3c..5f6c4fac 100644
|
|
--- a/src/test/unittests/CMakeLists.txt
|
|
+++ b/src/test/unittests/CMakeLists.txt
|
|
@@ -51,8 +51,8 @@ list(APPEND headers ${platform_sources})
|
|
include_directories(
|
|
../../
|
|
../../lib/
|
|
- ../../../ext/gtest-1.6.0/include
|
|
- ../../../ext/gmock-1.6.0/include
|
|
+ ../../../ext/gtest-1.7.0/include
|
|
+ ../../../ext/gmock-1.7.0/include
|
|
../../../ext
|
|
)
|
|
|
|
--
|
|
2.17.1
|
|
|