summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/actions/format-setup/action.yml2
-rw-r--r--CMakeLists.txt4
-rwxr-xr-xextras/formatting.sh9
3 files changed, 11 insertions, 4 deletions
diff --git a/.github/actions/format-setup/action.yml b/.github/actions/format-setup/action.yml
index 1028ce6bb..2dab1f0cd 100644
--- a/.github/actions/format-setup/action.yml
+++ b/.github/actions/format-setup/action.yml
@@ -8,7 +8,7 @@ runs:
- name: install gersemi
shell: bash
run: |
- pip3 install gersemi colorama
+ pip3 install gersemi==0.21 colorama
- name: install clang-format
shell: bash
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 549e465ac..685f5a141 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,7 +188,7 @@ mark_as_advanced(SLANG_SPIRV_HEADERS_INCLUDE_DIR)
# dependency name, rather than to the dependency directory itself, for example
# SLANG_OVERRIDE_LZ4_PATH points to a directory containing a directory called
# `lz4` containing the lz4 source.
-#
+#
advanced_option(
SLANG_OVERRIDE_LZ4_PATH
"Build using user defined path for LZ4"
@@ -494,7 +494,7 @@ configure_package_config_file(
# Conditionally handle the case for Emscripten where slang does not create
# linkable targets. In this case do not export the targets. Otherwise, just
-# export the slang targets.
+# export the slang targets.
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
if(NOT ${SLANG_LIB_TYPE} STREQUAL "STATIC")
install(
diff --git a/extras/formatting.sh b/extras/formatting.sh
index 94df651eb..e5a73762a 100755
--- a/extras/formatting.sh
+++ b/extras/formatting.sh
@@ -97,6 +97,13 @@ require_bin() {
if [ "$no_version_check" -eq 0 ]; then
version=$("$name" --version | grep -oP "\d+\.\d+\.?\d*" | head -n1)
+ # Debug output to stderr
+ if [ -n "$max_version" ]; then
+ echo "found $name $version, required [$min_version, $max_version)" >&2
+ else
+ echo "found $name $version, required at least $min_version" >&2
+ fi
+
if ! printf '%s\n%s\n' "$min_version" "$version" | sort -V -C; then
echo "$name version $version is too old. Version $min_version or newer is required." >&2
missing_bin=1
@@ -114,7 +121,7 @@ require_bin() {
}
require_bin "git" "1.8"
-((run_all || run_cmake)) && require_bin "gersemi" "0.17"
+((run_all || run_cmake)) && require_bin "gersemi" "0.21" "0.22"
((run_all || run_cpp)) && require_bin "xargs" "3"
require_bin "diff" "2"
((run_all || run_cpp)) && require_bin "clang-format" "17" "18"