Indexed by TopGit from live GitHub metadata: nlohmann/cmake_min_version has 178 stars, written primarily in Python. Determine the minimal requirement CMake version of a project
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Every CMake project requires a call to cmake_minimum_required to set the minimally required CMake version. However, CMake gives no guidance what this version may be, and a lot of projects just take the current CMake version or whatever the IDE is proposing as default. This is a problem, because some platforms don't always provide the latest CMake version, and a lot of trial and error is needed before projects can be used.
cmake_min_version is a script to determine the minimal working version of CMake for a given project. It does not do any magic, but just performs a binary search using a pool of CMake binaries and basically implements the "trial and error" in an efficient way.
Example
Assume ~/projects/example contains a project with a CMakeLists.txt file. Then the following call determines the minimal working version of CMake:
As a result, ~/projects/example/CMakeLists.txt could be adjusted to require CMake 3.8.0.
More options:
usage: cmake_min_version.py [-h] [--tools_directory DIR] [--full_search] [--error_details]
params [params ...]
Find the minimal required CMake version for a project.
positional arguments:
params parameters to pass to CMake
options:
-h, --help show this help message and exit
--tools_directory DIR
path to the CMake binaries (default: "tools")
--full_search Searches using a top down approach instead of a binary search (default: False)
--error_details Print the full stderr output in case of an error (default: False)
FAQ
Q: Isn't this a rather naive and inefficient approach to achieve the goal?
A: Yes, but I am currently not aware of a better one. I would be happy to replace this repository with a link on a tool that achieves the same goal.
Setup
In a nutshell
Install a Python virtual requirement (Python 3.6 or later).
The script cmake_downloader.py takes care of downloading CMake binaries:
usage: cmake_downloader.py [-h] [--os {macos,linux,windows}] [--latest_release]
[--latest_patch] [--first_minor]
[--release_candidates] [--min_version MIN_VERSION]
[--max_version MAX_VERSION] [--tools_directory DIR]
Download CMake binaries.
options:
-h, --help show this help message and exit
--os {macos,linux,windows}
OS to download CMake for (default: linux)
--latest_release only download the latest release (default: False)
--latest_patch only download the latest patch version for each release (default: False)
--first_minor only download the first minor version for each release (default: False)
--release_candidates also consider release candidates (default: False)
--min_version MIN_VERSION
only download versions greater or equal than MIN_VERSION
--max_version MAX_VERSION
only download versions less or equal than MAX_VERSION
--tools_directory DIR
path to the CMake binaries (default: "tools")
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Does nlohmann/cmake_min_version have a project website?
No homepage URL was recorded for nlohmann/cmake_min_version in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on nlohmann/cmake_min_version?
The most recent commit recorded on nlohmann/cmake_min_version was 2.5 years ago, based on the GitHub push timestamp. The repository has 15 forks — one of the better signals of community interest.
How many stars does nlohmann/cmake_min_version have?
nlohmann/cmake_min_version has 178 GitHub stars — refresh the page for the live number, or check github.com/nlohmann/cmake_min_version. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is nlohmann/cmake_min_version written in?
nlohmann/cmake_min_version is written primarily in Python. GitHub's language field is based on the largest share of bytes in the default branch.
What license does nlohmann/cmake_min_version use?
nlohmann/cmake_min_version is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is nlohmann/cmake_min_version associated with?
GitHub's repository topics for nlohmann/cmake_min_version: "cmake". TopGit's editorial category is open-source.
Where do I read more about nlohmann/cmake_min_version?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/nlohmann/cmake_min_version is the definitive source.
Read full README in the tab above.
Still deciding about cmake_min_version?
One click hands the question to an AI along with this page — see what it says about cmake_min_version.