aws-sdk-cpp: fix cross compilation

aws-sdk-cpp tries to run code at build time using check_c_source_runs
[0] and therefore needs to be told about the expected exit code [1].

[0] https://cmake.org/cmake/help/latest/module/CheckCSourceRuns.html
[1] https://cmake.org/cmake/help/latest/command/try_run.html#behavior-when-cross-compiling
This commit is contained in:
Justin Humm 2019-05-14 23:41:59 +02:00
parent 4c6b5c12d0
commit 2d8b3df99b
No known key found for this signature in database
GPG Key ID: 5F24E3BD56617EB2

View File

@ -37,8 +37,10 @@ stdenv.mkDerivation rec {
"-DBUILD_DEPS=OFF"
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
] ++ lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0"
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DENABLE_TESTING=OFF"
++ lib.optional (apis != ["*"])
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"-DENABLE_TESTING=OFF"
"-DCURL_HAS_H2=0"
] ++ lib.optional (apis != ["*"])
"-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
preConfigure =