Commit 127236cb authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

ctranslate2: fix CMake 4 compatibility

parent c0b9be4e
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -38,6 +38,19 @@ stdenv'.mkDerivation (finalAttrs: {
    hash = "sha256-EM2kunqtxo0BTIzrEomfaRsdav7sx6QEOhjDtjjSoYY=";
  };

  # Fix CMake 4 compatibility
  postPatch = ''
    substituteInPlace third_party/cpu_features/CMakeLists.txt \
      --replace-fail \
        'cmake_minimum_required(VERSION 3.0)' \
        'cmake_minimum_required(VERSION 3.10)'

    substituteInPlace third_party/ruy/third_party/cpuinfo/deps/clog/CMakeLists.txt \
      --replace-fail \
        'CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)' \
        'CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)'
  '';

  nativeBuildInputs = [
    cmake
  ]