Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ThirdParty/GTest/Fsl.gen
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ExternalDependency Name="gtest_main" Access="Public" Type="StaticLib"/>
</Platform>
<Platform Name="Ubuntu;Windows" Supported="true">
<Dependency Name="Recipe.GTest_1_11"/>
<Dependency Name="Recipe.GTest_1_17"/>
</Platform>

</ExternalLibrary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<FslBuildGen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../FslBuildGen.xsd">
<ExternalLibrary Name="Recipe.GTest_1_11" CreationYear="2017">
<ExternalLibrary Name="Recipe.GTest_1_17" CreationYear="2017">
<Default.Platform.Supported Value="false"/>
<Requirement Name="GoogleUnitTest" Type="feature"/>
<Platform Name="Ubuntu" Supported="true">
<ExperimentalRecipe Name="GTest" Version="1.11" FindTargetName="GTest::GTest GTest::Main">
<ExperimentalRecipe Name="GTest" Version="1.17" FindTargetName="GTest::GTest GTest::Main">
<Pipeline>
<Download URL="https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz" To="googletest-1.11.0.tar.gz" Hash="b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5"/>
<Unpack File="googletest-1.11.0.tar.gz" OutputPath="googletest-release-1.11.0"/>
<Download URL="https://github.com/google/googletest/releases/download/v1.17.0/googletest-1.17.0.tar.gz" To="googletest-1.17.0.tar.gz" Hash="65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c"/>
<Unpack File="googletest-1.17.0.tar.gz" OutputPath="googletest-1.17.0"/>
<Copy>
<GitApply From="{RECIPE_PATH}/changes-debug.patch"/>
</Copy>
<CMakeBuild Project="googletest-distribution" Target="install" Configuration="release" Options="-Dgtest_force_shared_crt=ON" OutputPath="_Install"/>
</Pipeline>
<Installation>
Expand All @@ -20,10 +23,13 @@
</ExperimentalRecipe>
</Platform>
<Platform Name="Windows" Supported="true">
<ExperimentalRecipe Name="GTest" Version="1.11" FindTargetName="GTest::GTest GTest::Main" Find="true">
<ExperimentalRecipe Name="GTest" Version="1.17" FindTargetName="GTest::GTest GTest::Main" Find="true">
<Pipeline>
<Download URL="https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz" To="googletest-1.11.0.tar.gz" Hash="b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5"/>
<Unpack File="googletest-1.11.0.tar.gz" OutputPath="googletest-release-1.11.0"/>
<Download URL="https://github.com/google/googletest/releases/download/v1.17.0/googletest-1.17.0.tar.gz" To="googletest-1.17.0.tar.gz" Hash="65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c"/>
<Unpack File="googletest-1.17.0.tar.gz" OutputPath="googletest-1.17.0"/>
<Copy>
<GitApply From="{RECIPE_PATH}/changes-debug.patch"/>
</Copy>
<CMakeBuild Project="googletest-distribution" Target="install" Configuration="debug;release" Options="-Dgtest_force_shared_crt=ON" OutputPath="_Install"/>
</Pipeline>
<Installation>
Expand Down
15 changes: 15 additions & 0 deletions ThirdParty/Recipe/GTest_1_17/changes-debug.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,12 @@ if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()

+if(MSVC)
+ # Always apply postfix for Debug configs in MSVC
+ set(CMAKE_DEBUG_POSTFIX d)
+ message(STATUS "MSVC detected: Debug postfix enabled ('d')")
+endif()
+
enable_testing()

include(CMakeDependentOption)