crocoddyl: enable multithread, mim-solvers: enable multithread (#528586)
This commit is contained in:
@@ -7,10 +7,13 @@
|
||||
ffmpeg,
|
||||
ipopt,
|
||||
lapack,
|
||||
llvmPackages,
|
||||
lib,
|
||||
pinocchio,
|
||||
pkg-config,
|
||||
stdenv,
|
||||
|
||||
withMultithread ? true,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -45,6 +48,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pinocchio
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && withMultithread) [
|
||||
llvmPackages.openmp
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
ffmpeg
|
||||
];
|
||||
@@ -53,8 +60,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
|
||||
(lib.cmakeBool "BUILD_EXAMPLES" false)
|
||||
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
|
||||
(lib.cmakeBool "BUILD_WITH_MULTITHREADS" withMultithread)
|
||||
];
|
||||
|
||||
passthru = { inherit withMultithread; };
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace \
|
||||
examples/CMakeLists.txt \
|
||||
|
||||
@@ -28,7 +28,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
|
||||
buildInputs = lib.optional (
|
||||
stdenv.hostPlatform.isDarwin && crocoddyl.withMultithread
|
||||
) llvmPackages.openmp;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
crocoddyl
|
||||
@@ -38,6 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
|
||||
(lib.cmakeBool "BUILD_WITH_PROXSUITE" true)
|
||||
(lib.cmakeBool "BUILD_WITH_MULTITHREADS" crocoddyl.withMultithread)
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
||||
Reference in New Issue
Block a user