aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoby Kahane <kobykahane@gmail.com>2018-04-03 05:34:51 +0300
committerRobert Schumacher <roschuma@microsoft.com>2018-04-02 19:34:51 -0700
commita143d1a7fc817ba877b90e8fb0c0865325997885 (patch)
tree24426915b2cc9786b66cb7d62020b5e34b7fea45
parent5715b6023b98028d505aee99946864f1b4ddc417 (diff)
downloadvcpkg-a143d1a7fc817ba877b90e8fb0c0865325997885.tar.gz
vcpkg-a143d1a7fc817ba877b90e8fb0c0865325997885.zip
[gtest] Fix missing debug information (#3148)
* [gtest] Fix missing debug information Patch a CMake file in gtest not to override the /Z7 compiler option that embeds debug info in the .lib with /Zi that places it in a .pdb. This fixes linker warning LNK4099 when linking with gmock.lib. * [gtest] Bump version to include Zi change
-rw-r--r--ports/gtest/0002-Fix-z7-override.patch13
-rw-r--r--ports/gtest/CONTROL2
-rw-r--r--ports/gtest/portfile.cmake1
3 files changed, 15 insertions, 1 deletions
diff --git a/ports/gtest/0002-Fix-z7-override.patch b/ports/gtest/0002-Fix-z7-override.patch
new file mode 100644
index 000000000..c8de56d09
--- /dev/null
+++ b/ports/gtest/0002-Fix-z7-override.patch
@@ -0,0 +1,13 @@
+diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
+index 777b91e..75a13c9 100644
+--- a/googletest/cmake/internal_utils.cmake
++++ b/googletest/cmake/internal_utils.cmake
+@@ -55,7 +55,7 @@ macro(config_compiler_and_linker)
+ if (MSVC)
+ # Newlines inside flags variables break CMake's NMake generator.
+ # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
+- set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi")
++ set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J")
+ if (MSVC_VERSION LESS 1400) # 1400 is Visual Studio 2005
+ # Suppress spurious warnings MSVC 7.1 sometimes issues.
+ # Forcing value to bool.
diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL
index e76e815c4..2fa32ae3c 100644
--- a/ports/gtest/CONTROL
+++ b/ports/gtest/CONTROL
@@ -1,3 +1,3 @@
Source: gtest
-Version: 1.8.0-7
+Version: 1.8.0-8
Description: GoogleTest and GoogleMock testing frameworks.
diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake
index b5f3e58c8..72fe5813e 100644
--- a/ports/gtest/portfile.cmake
+++ b/ports/gtest/portfile.cmake
@@ -15,6 +15,7 @@ vcpkg_from_github(
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-z7-override.patch
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT)