apotocki/googletest 1.18.0 (r1, windows)
- Library
- googletest
- Variant
- windows, target windows
- Channel
- stable
- Published
- 2026-11-07
- Recipe source
- https://github.com/otok-dev/recipes.git
32756a87cf5bd189ca4c9825159bf0713ea8cf5einrecipes/googletest/1.18/windows/ - Recipe SHA-256
1b1f4be6c858f0bb4076139a60d47ddcbadba6632555f79e54bb29cc62a37608
Recipe files changed
Inputs
| source.commit | 063de7e9578f82b369302001269680b4b1553359 |
|---|---|
| source.git | https://github.com/google/googletest |
| source.tag | v1.18.0 |
Platforms
windows
Toolchains
cmake { default-recipe = "apotocki/cmake", version = ">= 3.20" }ninja { default-recipe = "apotocki/ninja", version = ">= 1.10" }
Recipe files
build.lua
-- The CMake project with gmock, without its own tests: gtest.lib, gtest_main.lib, gmock.lib,
-- gmock_main.lib (with the suffix d in debug), and one include/ with gtest/ and gmock/.
function build(slice, options, deps)
otok.cmake{
-- otok's flags choose the MSVC runtime (/MD): gtest would otherwise pick /MT
defines = { BUILD_GMOCK = true, INSTALL_GTEST = true, gtest_force_shared_crt = true },
}
local p = slice.prefix
local libraries = {}
for _, name in ipairs{ "gtest", "gtest_main", "gmock", "gmock_main" } do
libraries[name] = otok.glob("lib/" .. name .. ".lib", p)[1]
or otok.glob("lib/" .. name .. "d.lib", p)[1]
end
return { libraries = libraries, headers = p .. "/include" }
end
recipe.toml
# The otok recipe of GoogleTest (https://github.com/apotocki/otok): gtest and gmock with their main libraries,
# static, for Windows, with MSVC or with clang-cl across from Linux, from the release tag.
[recipe]
api = 1
library = "googletest"
name = "googletest"
version = "1.18.0"
revision = 1
license = "BSD-3-Clause"
license-files = ["LICENSE"]
homepage = "https://github.com/google/googletest"
description = "GoogleTest and GoogleMock, Google's C++ test framework."
keywords = ["testing", "gtest", "gmock"]
linkage = ["static"]
cxx-standard = ">= 17"
[source]
git = "https://github.com/google/googletest"
commit = "063de7e9578f82b369302001269680b4b1553359"
tag = "v1.18.0"
[platforms]
supported = ["windows"]
build-on = ["windows/msvc", "linux/clang-cl"]
[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }
[[product]]
name = "GTest"
libraries = ["gtest"]
link = { runtime = "c++" }
[[product]]
name = "GTestMain"
libraries = ["gtest_main"]
headers = false
depends = ["GTest"]
[[product]]
name = "GMock"
libraries = ["gmock"]
headers = false
depends = ["GTest"]
[[product]]
name = "GMockMain"
libraries = ["gmock_main"]
headers = false
depends = ["GMock"]