mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
spdlog: fix cross-compilation
Currently, catch2 is listed in checkInputs, which means it is not available when cross-compiling. On the other hand, -DSPDLOG_BUILD_TESTS=ON is passed unconditionally, causing the build to fail when cross-compiling. This can be fixed either by moving catch2 to buildInputs or by only building the tests when doCheck is true. This patch implements the former solution, so the tests are always built even if they cannot be run.
This commit is contained in:
parent
4b790413b4
commit
b6c05bc367
@ -31,8 +31,9 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
# Required to build tests, even if they aren't executed
|
||||
buildInputs = [ catch2_3 ];
|
||||
propagatedBuildInputs = [ fmt ];
|
||||
checkInputs = [ catch2_3 ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSPDLOG_BUILD_SHARED=${if staticBuild then "OFF" else "ON"}"
|
||||
|
Loading…
Reference in New Issue
Block a user