Skip to content

Commit f082ea5

Browse files
committed
Add ninja as a native build input for improved build performance
1 parent ee99f70 commit f082ea5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nix/openpfc/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: 2025 VTT Technical Research Centre of Finland Ltd
22
# SPDX-License-Identifier: AGPL-3.0-or-later
33

4-
{ lib, stdenv, cmake, mpi, heffte, nlohmann_json, catch2_3 ? null
4+
{ lib, stdenv, ninja, cmake, mpi, heffte, nlohmann_json, catch2_3 ? null
55
, doxygen ? null, version, src, buildType ? "Release", enableDocs ? true
66
, enableTests ? true, enableExamples ? true, enableApps ? true }:
77

@@ -15,12 +15,13 @@ stdenv.mkDerivation {
1515
platforms = lib.platforms.linux;
1616
};
1717

18-
nativeBuildInputs = [ cmake ];
18+
nativeBuildInputs = [ ninja cmake ];
1919

2020
buildInputs = [ mpi heffte nlohmann_json ] ++ lib.optional enableDocs doxygen
2121
++ lib.optional enableTests catch2_3;
2222

2323
cmakeFlags = [
24+
"-GNinja"
2425
"-DCMAKE_BUILD_TYPE=${buildType}"
2526
"-DOpenPFC_BUILD_TESTS=${if enableTests then "ON" else "OFF"}"
2627
"-DOpenPFC_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}"

0 commit comments

Comments
 (0)