Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- uses: astral-sh/setup-uv@v9.0.0

- name: Test package
run: uv run --with "clang<19" --group test pytest
run: uv run --group test pytest

# Commented for now -- msys2 Clang (v15) and the clang Python package (v14) are incompatible
#
Expand Down
2 changes: 1 addition & 1 deletion pybind11_mkdoc/mkdoc_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def read_args(args):
if "-x" not in args:
parameters.extend(["-x", "c++"])
if not any(it.startswith("-std=") for it in args):
parameters.append("-std=c++11")
parameters.append("-std=c++17")
parameters.append("-Wno-pragma-once-outside-header")

if platform.system() == "Darwin":
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
{ name = "Wenzel Jakob", email = "wenzel.jakob@epfl.ch" }
]
urls.homepage = "https://github.com/pybind/pybind11_mkdoc"
dependencies = ["clang"]
dependencies = ["clang<19"]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.9",
Expand Down
13 changes: 13 additions & 0 deletions tests/read_args_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from pybind11_mkdoc.mkdoc_lib import read_args


def test_default_std():
parameters, filenames = read_args(["sample.h"])
assert "-std=c++17" in parameters
assert filenames == ["sample.h"]


def test_explicit_std_wins():
parameters, _ = read_args(["-std=c++11", "sample.h"])
assert "-std=c++11" in parameters
assert "-std=c++17" not in parameters