Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
- name: get conan
uses: turtlebrowser/get-conan@main

- name: Ensure Jinja2 available to Conan
shell: bash
run: |
python -m pip install --upgrade "Jinja2>=3.1.5,<3.2"

- name: check cache
uses: actions/cache@v4
id: check_cache
Expand Down
16 changes: 12 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci-macos",
"hidden": true,
"inherits": ["ci-unix"],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
}
},
Comment on lines +62 to +69

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Don’t overwrite inherited CMAKE_CXX_FLAGS in ci-macos (drops -Wall/-Werror/etc.).

Setting CMAKE_CXX_FLAGS here replaces flags from flags-unix. Append instead.

Apply one of these:

-        "CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
+        "CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} -Wmissing-template-arg-list-after-template-kw"

Or guarded (Clang-only):

-        "CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
+        "CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wmissing-template-arg-list-after-template-kw>"

Quick check to ensure flags are preserved and the warning is accepted by AppleClang:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# 1) Confirm effective flags include both the base set and the new warning
cmake --preset ci-macos-tests -LAH | sed -n 's/^CMAKE_CXX_FLAGS:.*=//p'
# 2) Probe AppleClang accepts the flag (should emit no diagnostics)
echo 'int main(){}' | clang++ -std=c++20 -Werror -Wno-unknown-warning-option -Wmissing-template-arg-list-after-template-kw -x c++ -c -

Length of output: 189


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate CMakePresets.json
preset_file=$(fd CMakePresets.json -t f | head -1)
echo "Using CMakePresets file: $preset_file"

# Show snippet for ci-unix preset (inherited flags)
echo "---- ci-unix preset snippet ----"
rg -nP '"name"\s*:\s*"ci-unix"' -A6 -B2 "$preset_file"

# Show snippet for ci-macos preset
echo "---- ci-macos preset snippet ----"
rg -nP '"name"\s*:\s*"ci-macos"' -A6 -B2 "$preset_file"

Length of output: 924


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show flags-unix preset snippet (inherited by ci-unix → ci-macos)
rg -nP '"name"\s*:\s*"flags-unix"' -A8 -B2 CMakePresets.json

# Check for ci-macos-tests preset referenced in the review
rg -nP '"name"\s*:\s*"ci-macos-tests"' -nC1 CMakePresets.json || echo "ci-macos-tests preset not found"

Length of output: 1095


Preserve inherited CMAKE_CXX_FLAGS in the ci-macos preset
Overriding here drops the base flags (-Wall, -Werror, etc.). Change:

-        "CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
+        "CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} -Wmissing-template-arg-list-after-template-kw"

(or guard with a Clang-only generator expression if preferred)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"name": "ci-macos",
"hidden": true,
"inherits": ["ci-unix"],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
}
},
{
"name": "ci-macos",
"hidden": true,
"inherits": ["ci-unix"],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} -Wmissing-template-arg-list-after-template-kw"
}
},
🤖 Prompt for AI Agents
In CMakePresets.json around lines 62–69, the ci-macos preset currently replaces
CMAKE_CXX_FLAGS and drops inherited flags like -Wall/-Werror; instead preserve
the base flags by appending the macOS-specific flag rather than overriding, or
conditionally add it only for Clang via a generator expression. Update the
cacheVariables entry so it expands the existing CMAKE_CXX_FLAGS and appends "
-Wmissing-template-arg-list-after-template-kw" (or wrap that flag in a
Clang-only generator expression) to retain inherited warnings and errors.

{
"name": "ci-win64",
"inherits": ["flags-windows"],
Expand Down Expand Up @@ -219,7 +227,7 @@
},
{
"name": "ci-macos-tests",
"inherits": ["ci-build", "build-tests", "build-examples", "build-qt", "build-grpc", "build-asio", "build-sfml", "ci-unix"]
"inherits": ["ci-build", "build-tests", "build-examples", "build-qt", "build-grpc", "build-asio", "build-sfml", "ci-macos"]
},
{
"name": "ci-ubuntu-clang-tests",
Expand All @@ -242,7 +250,7 @@

{
"name": "ci-macos-benchmarks",
"inherits": ["ci-build", "build-benchmarks", "ci-unix"]
"inherits": ["ci-build", "build-benchmarks", "ci-macos"]
},
{
"name": "ci-ubuntu-clang-benchmarks",
Expand All @@ -264,7 +272,7 @@
"build-dir",
"build-tests",
"build-examples",
"ci-unix"
"ci-macos"
]
},
{
Expand Down Expand Up @@ -301,7 +309,7 @@
"inherits": [
"build-dir",
"build-benchmarks",
"ci-unix"
"ci-macos"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def requirements(self):
self.requires("nanobench/4.3.11")

if self.options.with_sfml:
self.requires("sfml/2.6.1", options={"audio": False})
self.requires("sfml/2.6.2", options={"audio": False})

if self.options.with_grpc:
self.requires("grpc/1.54.3", transitive_libs=True, transitive_headers=True)
Expand Down
Loading