mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 14:41:27 +00:00
gtest: add static option
This commit is contained in:
parent
a1ff433e0a
commit
015ba1e833
@ -1,4 +1,10 @@
|
||||
{ lib, stdenv, cmake, ninja, fetchFromGitHub }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, ninja
|
||||
, static ? stdenv.hostPlatform.isStatic,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gtest";
|
||||
@ -20,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ninja ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
] ++ lib.optionals (stdenv.cc.isClang && (lib.versionOlder stdenv.cc.version "16.0")) [
|
||||
# Enable C++17 support
|
||||
# https://github.com/google/googletest/issues/3081
|
||||
|
Loading…
Reference in New Issue
Block a user