TypeRunner icon indicating copy to clipboard operation
TypeRunner copied to clipboard

Compatibility with CMake < 3.5 has been removed from CMake

Open samvv opened this issue 5 months ago • 0 comments

Hi,

I have read your issue on the TypeScript repo. It was inspiring. Just to educate myself I'm trying to replicate your idea in Rust.

CMake code generation fails with:

-- The C compiler identification is GNU 15.1.1
-- The CXX compiler identification is GNU 15.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at libs/doctest/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

Fixed by manually modifying libs/doctest/CMakeLists.txt:

-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.15)

Though I don't know if this is the right way forward.

I'm running Arch Linux with CMake version 4.0.3.

samvv avatar Aug 03 '25 23:08 samvv