67 lines
2.2 KiB
Diff
67 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
|
Date: Fri, 1 Nov 2024 16:52:09 +0100
|
|
Subject: [PATCH] Reapply "test: query system include args from clang"
|
|
|
|
Still needed; Clang issue?
|
|
|
|
This reverts commit 124385241fbb3d3181a0420e56998d37cb328f1e.
|
|
---
|
|
test/conf.py | 6 ++++--
|
|
test/testenv.py | 5 +++++
|
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/test/conf.py b/test/conf.py
|
|
index 6b95fa7b75e9..7431b5d43b82 100644
|
|
--- a/test/conf.py
|
|
+++ b/test/conf.py
|
|
@@ -3,6 +3,8 @@
|
|
# For the full list of built-in configuration values, see the documentation:
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
+from hawkmoth.util import compiler
|
|
+
|
|
# -- Project information -----------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
|
|
@@ -32,8 +34,8 @@ pygments_style = None
|
|
# -- Options for Hawkmoth ----------------------------------------------------
|
|
# https://jnikula.github.io/hawkmoth/dev/extension.html#configuration
|
|
|
|
-hawkmoth_clang_c = ['-std=c17']
|
|
-hawkmoth_clang_cpp = ['-std=c++17']
|
|
+hawkmoth_clang_c = ['-std=c17'] + compiler.get_include_args()
|
|
+hawkmoth_clang_cpp = ['-std=c++17'] + compiler.get_include_args()
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
diff --git a/test/testenv.py b/test/testenv.py
|
|
index 77f6e88abeb8..9bf2f0224196 100644
|
|
--- a/test/testenv.py
|
|
+++ b/test/testenv.py
|
|
@@ -7,12 +7,15 @@ import sys
|
|
import pytest
|
|
import strictyaml
|
|
|
|
+from hawkmoth.util import compiler
|
|
from test import conf
|
|
|
|
testext = '.yaml'
|
|
testdir = os.path.dirname(os.path.abspath(__file__))
|
|
rootdir = os.path.dirname(testdir)
|
|
|
|
+_clang_include_args = compiler.get_include_args()
|
|
+
|
|
sys.path.insert(0, rootdir)
|
|
|
|
class Directive:
|
|
@@ -52,6 +55,8 @@ class Directive:
|
|
else:
|
|
clang_args.extend(getattr(conf, 'hawkmoth_clang_cpp', []))
|
|
|
|
+ clang_args.extend(_clang_include_args.copy())
|
|
+
|
|
clang_args.extend(self.options.get('clang', []))
|
|
|
|
return clang_args
|