Điểm qua nlohmann/cmake_min_version: 178 sao trên GitHub, viết chủ yếu bằng Python. Determine the minimal requirement CMake version of a project
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/nlohmann/cmake_min_version là nguồn chính thức.
nlohmann/cmake_min_version có bao nhiêu sao?
nlohmann/cmake_min_version có 178 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/nlohmann/cmake_min_version. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
nlohmann/cmake_min_version có những chủ đề gì?
GitHub topics của nlohmann/cmake_min_version: "cmake". TopGit xếp repo vào nhóm mã nguồn mở.
nlohmann/cmake_min_version có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho nlohmann/cmake_min_version. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
nlohmann/cmake_min_version còn đang phát triển không?
Commit gần nhất trên nlohmann/cmake_min_version là 2.5 năm trước (theo timestamp GitHub). Repo có 15 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
nlohmann/cmake_min_version dùng license gì?
nlohmann/cmake_min_version phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
nlohmann/cmake_min_version viết bằng ngôn ngữ gì?
nlohmann/cmake_min_version chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về cmake_min_version?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về cmake_min_version.