GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ENH: Add support to find Headers in Apple Frameworks by hjmjohnson · Pull Request #448 · cppcheck-opensource/simplecpp

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Jun 26, 2025

Copy link
Copy Markdown

The header locations in apple frameworks require manipulation of the directory name in a '<pkg/myhdr.h>' include defintion.

The header file is located at <pkg.framework/Headers/myhdr.h> in a framework.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hjmjohnson added a commit to hjmjohnson/PythonQt that referenced this pull request Jun 27, 2025
@hjmjohnson
ENH: Improve Qt include path resolution macOS
2fde0d7
Add specific framework path handling

Refactor include directory parsing to support multiple candidate paths
for headers and introduce macOS-specific logic for resolving
framework-relative header paths. Enhance generator flexibility and
robustness for cross-platform usage.

Push upstream fix via:
cppcheck-opensource/simplecpp#448
@danmar

danmar commented Jun 28, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Thanks for your contribution.

  • An issue would be nice.
  • And some test.
  • We haven't switched to C++11 yet so that this simplecpp library will be as portable as possible. However I think we can start supporting C++11. I think C++11 should be widely supported by now. :-)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hjmjohnson

hjmjohnson commented Jul 1, 2025

Copy link
Copy Markdown
Author

It might be a few weeks before I circle back to push changes upstream.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danmar

danmar commented Jul 2, 2025

Copy link
Copy Markdown
Collaborator

It might be a few weeks before I circle back to push changes upstream.

ok thanks understood.. for your information we have a PR to start using C++11 so if you get back in few weeks I will hopefully not complain about you using C++11 at least.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hjmjohnson added a commit to hjmjohnson/PythonQt that referenced this pull request Jul 16, 2025
@hjmjohnson
ENH: Improve Qt include path resolution macOS
874d44e
Add specific framework path handling

Refactor include directory parsing to support multiple candidate paths
for headers and introduce macOS-specific logic for resolving
framework-relative header paths. Enhance generator flexibility and
robustness for cross-platform usage.

Push upstream fix via:
cppcheck-opensource/simplecpp#448
hjmjohnson added a commit to hjmjohnson/PythonQt that referenced this pull request Jul 16, 2025
@hjmjohnson
ENH: Improve Qt include path resolution macOS
1ef426a
Add specific framework path handling

Refactor include directory parsing to support multiple candidate paths
for headers and introduce macOS-specific logic for resolving
framework-relative header paths. Enhance generator flexibility and
robustness for cross-platform usage.

Push upstream fix via:
cppcheck-opensource/simplecpp#448
hjmjohnson added a commit to hjmjohnson/PythonQt that referenced this pull request Jul 16, 2025
@hjmjohnson
ENH: Improve Qt include path resolution macOS
022f805
Add specific framework path handling

Refactor include directory parsing to support multiple candidate paths
for headers and introduce macOS-specific logic for resolving
framework-relative header paths. Enhance generator flexibility and
robustness for cross-platform usage.

Push upstream fix via:
cppcheck-opensource/simplecpp#448
@hjmjohnson hjmjohnson mentioned this pull request Jul 16, 2025
ENH: Improve Qt include path resolution macOS MeVisLab/pythonqt#271
Closed
hjmjohnson added 2 commits July 16, 2025 15:41
@hjmjohnson
ENH: Add support to find Headers in Apple Frameworks
ae98755
The header locations in apple frameworks require manipulation
of the directory name in a '<pkg/myhdr.h>' include defintion.

The header file is located at <pkg.framework/Headers/myhdr.h>
in a framework.
@hjmjohnson
ENH: Add test outline for Apple framework include handling
de9d233
This is an outline of a test. The test currently fails.  I could not figure out how these tests are working.

I would greatly appreciate a little help to understand how to use the test framework.
@hjmjohnson
hjmjohnson force-pushed the enh-add-apple-framework-header-support branch from 31bffbf to de9d233 Compare July 16, 2025 21:40
@hjmjohnson

hjmjohnson commented Jul 16, 2025

Copy link
Copy Markdown
Author

@danmar I have updated this PR, but I am struggling to figure out how to make a test to exercise this code. I tried to decipher how other tests were working, but could not identify how the "cache" would need to be setup to test the new functionality. Any guidance would be greatly appreciated.

Thanks,
Hans

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hjmjohnson

hjmjohnson commented Jul 16, 2025

Copy link
Copy Markdown
Author

@glankk Thank you for the C++11 updates! This is great work!

This PR is adjacent to some code that you recently refactored. It would be great to have your input.

Thanks,
Hans

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@glankk

glankk commented Jul 17, 2025

Copy link
Copy Markdown
Collaborator

I suggest we emulate gcc's darwin-specific -F option, and possibly -iframework as well. See https://gcc.gnu.org/onlinedocs/gcc/Darwin-Options.html. The -F paths are interleaved with -I and searched left-to-right, so the order of interleaved normal include paths and frameworks should be preserved. For this we could change the DUI::includePaths from being a vector of path strings to being a vector of structs with a path string and, on darwin, a framework flag that determines what search rules to use.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danmar

danmar commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator

I will go on vacation for a week. Please ping me later if you want review..

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hjmjohnson

hjmjohnson commented Aug 5, 2025

Copy link
Copy Markdown
Author

@glankk This is likely a great suggestion, but it is increasing the scope of effort beyond what I can contribute in the short term.

Do you have the bandwidth to make the changes that you recommend, if so, please take whatever is useful from my suggestion and incorporate it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

danmar
danmar reviewed Aug 23, 2025
View reviewed changes

@danmar danmar left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Well I have no idea how it should work. So I'll just have to trust you that this is the proper method.
I don't know.. do you @glankk know if this looks like a proper method.. inserting ".framework/Headers" like that in the filename?

I would like that the test is enabled. the "test.cpp" is supposed to be unit/module tests.. i.e. don't depend on some header files on the system.. you could for instance unit test your changes by breaking out your code into a separate function.
imho it would be better to write the test in "integration_test.py". do you have any experience with python+pytest?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Aug 25, 2025
Improve runastyle scripts and update astyle version #508
Closed
feat: Ordered search paths for -I, -isystem, -F, -iframework + Darwin framework support (with legacy -I back-compat) #511
Open
@firewave

firewave commented Aug 26, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

The behavior should not be limited to builds made on Apple systems. It should be platform-agnostic and controlled by an explicit DUI option or the presence of __APPLE__ in the provided preprocessor macros (or both?).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

firewave commented Aug 26, 2025

Copy link
Copy Markdown
Collaborator

The tests would probably be best implemented in Python.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

firewave commented Aug 26, 2025

Copy link
Copy Markdown
Collaborator

And shouldn't this be done for system headers only? I doubt you want to look up random local includes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcfr

jcfr commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

This pull request should be closed as it is superseded by:

  • feat: Ordered search paths for -I, -isystem, -F, -iframework + Darwin framework support (with legacy -I back-compat) #511

For additional context, @hjmjohnson and I have been working together on this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hjmjohnson

hjmjohnson commented Aug 27, 2025

Copy link
Copy Markdown
Author

Comprehensive solution addressed in #511.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hjmjohnson hjmjohnson closed this Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@danmar danmar danmar left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@hjmjohnson @danmar @glankk @firewave @jcfr
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.