mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 08:14:19 +00:00
aws-sdk-cpp: add 'tests.cmake-find-package'
tests for 'aws-sdk-cpp does not work with cmake's find_package() issue 70075'
This commit is contained in:
parent
2cb609096d
commit
de9a34d3f1
@ -10,6 +10,7 @@
|
|||||||
, AudioToolbox
|
, AudioToolbox
|
||||||
, nix
|
, nix
|
||||||
, arrow-cpp
|
, arrow-cpp
|
||||||
|
, aws-sdk-cpp
|
||||||
, # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
|
, # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
|
||||||
apis ? ["*"]
|
apis ? ["*"]
|
||||||
, # Whether to enable AWS' custom memory management.
|
, # Whether to enable AWS' custom memory management.
|
||||||
@ -110,6 +111,36 @@ stdenv.mkDerivation rec {
|
|||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests = {
|
||||||
inherit nix arrow-cpp;
|
inherit nix arrow-cpp;
|
||||||
|
cmake-find-package = stdenv.mkDerivation {
|
||||||
|
pname = "aws-sdk-cpp-cmake-find-package-test";
|
||||||
|
version = "0";
|
||||||
|
dontUnpack = true;
|
||||||
|
nativeBuildInputs = [ cmake ];
|
||||||
|
buildInputs = [ aws-sdk-cpp ];
|
||||||
|
buildCommand = ''
|
||||||
|
cat > CMakeLists.txt <<'EOF'
|
||||||
|
find_package(AWSSDK)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Intentionally not using 'cmakeConfigurePhase' to test that find_package works without it.
|
||||||
|
mkdir build && cd build
|
||||||
|
if output=$(cmake -Wno-dev .. 2>&1); then
|
||||||
|
if grep -Fw -- "Found AWS" - <<< "$output"; then
|
||||||
|
touch "$out"
|
||||||
|
else
|
||||||
|
echo "'Found AWS' not found in the cmake output!" >&2
|
||||||
|
echo "The output was:" >&2
|
||||||
|
echo "$output" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n "'cmake -Wno-dev ..'" >&2
|
||||||
|
echo " returned a non-zero exit code." >&2
|
||||||
|
echo "$output" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user