Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain specific clang args #258

Merged
merged 5 commits into from
Sep 15, 2024
Merged

Domain specific clang args #258

merged 5 commits into from
Sep 15, 2024

Conversation

jnikula
Copy link
Owner

@jnikula jnikula commented Sep 14, 2024

Fix #255 and specify C and C++ standard to use for tests.

Importing conf.py in tests requires some changes in update-examples and mypy.

Change the hyphen to underscore in update_examples.py, and call it as a
module. This makes it easier for testenv.py to import stuff in the test
directory, as update_examples.py needs to import testenv.py. This also
allows mypy to check the module.
This allows mypy overrides for packages. Skip checks for imports in
tests, in preparation for importing conf.py.
Add config options hawkmoth_clang_c and hawkmoth_clang_cpp to pass
arguments to clang in the C and C++ domains, respectively.

Fixes #255
Replicate hawkmoth_clang, hawkmoth_clang_c, and hawkmoth_clang_cpp
config options for cli and parser tests in testenv. Tests can still
override them.
Define the language standard to use while testing. Use c17 and c++17,
fairly arbitrarily. We can remove the std option from template.yaml.

Note that the parser selects the -x language option based on domain and
filename suffix.
Copy link
Collaborator

@BrunoMSantos BrunoMSantos left a comment

Choose a reason for hiding this comment

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

Great one!

@jnikula jnikula merged commit 8ad4aa4 into master Sep 15, 2024
6 checks passed
@jnikula jnikula deleted the domain-specific-clang-args branch September 15, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It's not possible to define clang args separately for C and C++ in mixed language projects
2 participants