casadi: build on darwin
This commit is contained in:
parent
0f74c47896
commit
ded2f9eca4
@ -96,6 +96,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace swig/python/CMakeLists.txt --replace-fail \
|
||||
"if (SWIG_IMPORT)" \
|
||||
"if (NOT SWIG_IMPORT)"
|
||||
''
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
# this is only printing stuff, and is not defined on all CPU
|
||||
substituteInPlace casadi/interfaces/hpipm/hpipm_runtime.hpp --replace-fail \
|
||||
"d_print_exp_tran_mat" \
|
||||
"//d_print_exp_tran_mat"
|
||||
|
||||
# fix missing symbols
|
||||
substituteInPlace cmake/FindCLANG.cmake --replace-fail \
|
||||
"clangBasic)" \
|
||||
"clangBasic clangASTMatchers clangSupport)"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -138,7 +149,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optionals pythonSupport [
|
||||
python3Packages.numpy
|
||||
python3Packages.python
|
||||
];
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin [ llvmPackages_17.openmp ];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "WITH_PYTHON" pythonSupport)
|
||||
|
Loading…
Reference in New Issue
Block a user