Release Notes
Table of Contents
Support Policy
The following shows the supported versions of the “CMake Scripts” project.
Version | CMake | Release | Security Fixes Until |
---|---|---|---|
1.x |
3.30 - ? |
TBD | TBD |
0.x * |
3.30 - ? |
February 13th, 2025 | N/A |
* - current supported version.
TBD - “To be decided”.
N/A - “Not available”.
v0.x
Highlights
“Mini” Testing Framework
(available since v0.1
)
A “mini” testing framework for testing your CMake modules and scripts.
define_test("has built assets" "has_built_assets")
function(has_built_assets)
assert_file_exists("resources/images/menu_bg.png" MESSAGE "No menu bg")
assert_file_exists("resources/images/bg.png" MESSAGE "No background")
# ...etc
endfunction()
See testing module for additional information.
Git
(available since v0.1
)
Git related utilities.
git_find_version_tag(
OUTPUT version
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
message("${version}") # 1.15.2
See git module for additional information.
Version
(available since v0.1
)
Helpers for dealing with a project’s versioning
version_from_file(
FILE "version"
OUTPUT my_package
)
message("${my_package}_SEMVER") # 2.0.0-beta.3+AF1004
See version module for additional information.
Output
(available since v0.1
)
Various output and ANSI utilities.
output("Building package assets" NOTICE LABEL "✓" LABEL_FORMAT "[ %label% ] ")
[ ✓ ] Building package assets
See output module for additional information.
Debug
(available since v0.1
)
Debugging utils.
set(resources_list "chart.png;driver.ini;config.json")
dump(
resources_list
)
Outputs:
CMake Warning at cmake/rsp/debug.cmake:31 (message):
dump:
resources_list = (list 3) [
0: (string 9) "chart.png"
1: (string 10) "driver.ini"
2: (string 11) "config.json"
]
Call Stack (most recent call first):
CMakeLists.txt:108 (dump)
See debug module for additional information.
Logging
(available since v0.1
)
PSR-3 inspired logging utilities.
warning("Build incomplete"
CONTEXT
PROJECT_NAME
CMAKE_BINARY_DIR
CMAKE_PROJECT_NAME
)
CMake Warning at cmake/rsp/output.cmake:144 (message):
warning: Build incomplete
Context:
[
PROJECT_NAME = my-project
CMAKE_BINARY_DIR = /home/user/code/my-project/build
CMAKE_PROJECT_NAME = my-project
]
Timestamp: 2025-02-05 14:49:16.087085
Call Stack (most recent call first):
cmake/rsp/logging.cmake:335 (output)
cmake/rsp/logging.cmake:381 (log)
cmake/rsp/logging.cmake:158 (forward_to_log)
CMakeLists.txt:103 (warning)
See logging module for additional information.
Cache
(available since v0.1
)
Module that offers additional caching functionality (via CMake’s Cache Entry mechanism).
cache_set(
KEY foo
VALUE "bar"
TTL 5
)
# ... Elsewhere in your cmake scripts, 5 seconds later...
cache_get(KEY foo)
message("${foo}") # (empty string)
See cache module for additional information.
Changelog
For additional information about the latest release, new features, changes or defect fixes, please review the Changelog.