mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 12:39:54 +03:00
catboost: refactor
- suppress deprecation warning for substituteInPlace - replace cmake flags with lib.cmakeBool and lib.cmakeFeature
This commit is contained in:
parent
4bf3e6cf24
commit
c8cfe98c9e
@ -37,8 +37,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace cmake/common.cmake \
|
||||
--replace "\''${RAGEL_BIN}" "${ragel}/bin/ragel" \
|
||||
--replace "\''${YASM_BIN}" "${yasm}/bin/yasm"
|
||||
--replace-fail "\''${RAGEL_BIN}" "${ragel}/bin/ragel" \
|
||||
--replace-fail "\''${YASM_BIN}" "${yasm}/bin/yasm"
|
||||
|
||||
shopt -s globstar
|
||||
for cmakelists in **/CMakeLists.*; do
|
||||
@ -86,11 +86,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BINARY_DIR=$out"
|
||||
"-DCMAKE_POSITION_INDEPENDENT_CODE=on"
|
||||
"-DCATBOOST_COMPONENTS=app;libs${lib.optionalString pythonSupport ";python-package"}"
|
||||
] ++ lib.optionals cudaSupport [
|
||||
"-DHAVE_CUDA=on"
|
||||
(lib.cmakeFeature "CMAKE_BINARY_DIR" "$out")
|
||||
(lib.cmakeBool "CMAKE_POSITION_INDEPENDENT_CODE" true)
|
||||
(lib.cmakeFeature "CATBOOST_COMPONENTS" "app;libs${lib.optionalString pythonSupport ";python-package"}")
|
||||
(lib.cmakeBool "HAVE_CUDA" cudaSupport)
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
|
Loading…
Reference in New Issue
Block a user