Use Homebrew include directory for pcre2.h on macOS if necessary - #626
Conversation
|
Can this cause issues with wrong headers being used if pcre2 was not installed via Homebrew (but a Homebrew installation happens to exist)? |
|
I’ve thought about that, too. I consider it quite unlikely, but possible. I’ll take a closer look at it. It probably makes sense to check harder whether adding this include path is really necessary. |
e9072a4 to
8d84274
Compare
|
I have now revised this a bit. The directory is now added only if the compiler cannot find the file in the standard include directories and if it exists in the Homebrew include directory instead. |
8d84274 to
515ab43
Compare
|
I think this approach should work well. I plan to run a few more tests and merge it in a couple of days. If you have any concerns, please let me know. |
When pcre2 is installed via Homebrew on macOS, the header file pcre2.h is typically located in the Homebrew include directory. This leads to build errors since the compiler does not use this directory by default. Therefore, the Homebrew include directory is now added as include directory for the compiler if it contains pcre2.h. In addition, the CI has been extended to check the build on macOS.
515ab43 to
15aee40
Compare
|
While testing, I found another issue: |
When pcre2 is installed via Homebrew on macOS, the header file pcre2.h is typically located in the Homebrew include directory. This leads to build errors since the compiler does not use this directory by default. Therefore, the Homebrew include directory is now added as include directory for the compiler if it contains pcre2.h. In addition, the CI has been extended to check the build on macOS.
Closes #572