Skip to content

Commit

Permalink
gtest(patch): Add gtest version to CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
judaew committed May 21, 2023
1 parent 745a2c1 commit 634f1f6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
10 changes: 9 additions & 1 deletion devel/gtest/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PortGroup cmake 1.1
PortGroup legacysupport 1.1

github.setup google googletest 1.12.1 release-
revision 0
revision 1

name gtest
categories devel
Expand All @@ -28,6 +28,14 @@ checksums rmd160 3991930354c07c75875fba519d7aa6b12eba21a8 \
sha256 a28fa459c227d0bd97acc9c18503870b24eabaa69056c7f637144747c469e66a \
size 854915

patchfiles patch-add-gtest-version.diff

post-patch {
reinplace "s,@@GOOGLETEST_VERSION@@,${version},g" \
${worksrcpath}/googlemock/CMakeLists.txt \
${worksrcpath}/googletest/CMakeLists.txt
}

legacysupport.newest_darwin_requires_legacy 14
legacysupport.use_mp_libcxx yes

Expand Down
20 changes: 20 additions & 0 deletions devel/gtest/files/patch-add-gtest-version.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- googlemock/CMakeLists.txt.orig 2023-05-19 12:51:24.000000000 +0300
+++ googlemock/CMakeLists.txt 2023-05-19 12:52:53.512783464 +0300
@@ -38,6 +38,7 @@
# Language "C" is required for find_package(Threads).
cmake_minimum_required(VERSION 3.5)
cmake_policy(SET CMP0048 NEW)
+set(GOOGLETEST_VERSION @@GOOGLETEST_VERSION@@)
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)

if (COMMAND set_up_hermetic_build)
--- googletest/CMakeLists.txt.orig 2023-05-19 12:53:24.000000000 +0300
+++ googletest/CMakeLists.txt 2023-05-19 12:53:32.354596104 +0300
@@ -48,6 +48,7 @@

cmake_minimum_required(VERSION 3.5)
cmake_policy(SET CMP0048 NEW)
+set(GOOGLETEST_VERSION @@GOOGLETEST_VERSION@@)
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)

if (POLICY CMP0063) # Visibility

0 comments on commit 634f1f6

Please sign in to comment.