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

Fix internal header include paths. #1011

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

samhocevar
Copy link
Contributor

The extra leading "CLI/" part of include directives prevents the inclusion of CLI.hpp from a relative directory without an extra -I or /I compiler directive, and makes it harder to make CLI11 part of a larger codebase.

This is a regression of #475.

The extra leading "CLI/" part of include directives prevents the inclusion
of CLI.hpp from a relative directory without an extra -I or /I compiler
directive, and makes it harder to make CLI11 part of a larger codebase.

This is a regression of CLIUtils#475.
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e4ee3af) 100.00% compared to head (012a413) 100.00%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #1011    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           17        17            
  Lines         4546      4556    +10     
  Branches         0       971   +971     
==========================================
+ Hits          4546      4556    +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henryiii
Copy link
Collaborator

henryiii commented Feb 26, 2024

Is there any way to add this to tests / checks to avoid future regressions?

@samhocevar
Copy link
Contributor Author

I think a simple enough test would be, for a specific target:

  • remove ${CMAKE_SOURCE_DIR}/include from target_include_directories
  • replace #include "CLI/CLI.hpp" with #include "../include/CLI/CLI.hpp"
  • just check that everything compiles…

This makes assumptions about the source tree hierarchy, so I’m afraid it’s not a perfect solution.

@phlptp phlptp merged commit ffd11bf into CLIUtils:main Mar 11, 2024
54 checks passed
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.

3 participants