Skip to content

Commit 29ac900

Browse files
committed
Disable std module requirement in CI
1 parent 856a440 commit 29ac900

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/Build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,20 @@ jobs:
137137
else
138138
echo "NPROC=$(sysctl -n hw.ncpu)" >> "$GITHUB_ENV"
139139
fi
140+
- name: Disable std modules for CI
141+
run: |
142+
python3 - <<'PY'
143+
from pathlib import Path
144+
import re
145+
path = Path("CMakeLists.txt")
146+
text = path.read_text()
147+
updated = re.sub(r"^set\\(CMAKE_CXX_MODULE_STD\\s+1\\)$",
148+
"set(CMAKE_CXX_MODULE_STD 0)",
149+
text, flags=re.MULTILINE)
150+
if text == updated:
151+
raise SystemExit("CMAKE_CXX_MODULE_STD setting not found")
152+
path.write_text(updated)
153+
PY
140154
- name: Make directory
141155
run: mkdir -p build
142156
- name: Generate

0 commit comments

Comments
 (0)