google / google/snappy

Require Update to CMakeLists.txt for source build due to new CMake 4.0(+) requirements

Open
#204 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.6k
Forks
1.1k
Avg merge
3d 5h
Merged PRs (30d)
4

Description

e.g., if installing on older macOS (Catalina) via Homebrew, the last 15 lines of the log are:

```
-Wno-dev
-DBUILD_TESTING=OFF
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

CMake Error at CMakeLists.txt:29 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.

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

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

-- Configuring incomplete, errors occurred!

Error: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.
```

This is a relatively recurrent problem in Homebrew builds since Homebrew updated CMake to version 4 and deprecated all other versions. The fix in all cases is to update the broken CMake policy lines and/or the min/max version settings as per the reported errors.

Solution: dev team to confirm required min and max values and update CMakeLists.txt

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.