Skip to content

Fix internal header include paths.#1011

Merged
phlptp merged 1 commit intoCLIUtils:mainfrom
lolengine:fix/internal-include-paths
Mar 11, 2024
Merged

Fix internal header include paths.#1011
phlptp merged 1 commit intoCLIUtils:mainfrom
lolengine:fix/internal-include-paths

Conversation

@samhocevar
Copy link
Copy Markdown
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.
@codecov
Copy link
Copy Markdown

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
Copy Markdown
Collaborator

henryiii commented Feb 26, 2024

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

@samhocevar
Copy link
Copy Markdown
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.

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