Skip to content

try to find pcre.h for HAVE_RULES in any case#3185

Merged
danmar merged 3 commits intocppcheck-opensource:mainfrom
DGarry82:find-pcre-header
Mar 30, 2021
Merged

try to find pcre.h for HAVE_RULES in any case#3185
danmar merged 3 commits intocppcheck-opensource:mainfrom
DGarry82:find-pcre-header

Conversation

@DGarry82
Copy link
Copy Markdown
Contributor

@DGarry82 DGarry82 commented Mar 26, 2021

pcre.h may not be available using default system search paths (e.g. during cross-compilation),
thus have to be bootstrapped using CMAKE_STAGING_PREFIX/CMAKE_FIND_ROOT_PATH

it may be not available using default system search paths (e.g. during cross-compilation),
thus have to be bootstrapped using CMAKE_STAGING_PREFIX/CMAKE_FIND_ROOT_PATH
@amai2012 amai2012 requested a review from firewave March 26, 2021 14:53
Copy link
Copy Markdown
Collaborator

@firewave firewave left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

Please put this in findDependencies.cmake next to the library check and also please bail out if the include was not found.

I wonder if there is find_package() support for PCRE which should be added as well.

@firewave firewave self-assigned this Mar 26, 2021
@DGarry82
Copy link
Copy Markdown
Contributor Author

DGarry82 commented Mar 29, 2021

Please put this in findDependencies.cmake next to the library check and also please bail out if the include was not found.

Done.

I wonder if there is find_package() support for PCRE which should be added as well.

Seems there's still no official PCRE module support in CMake. There are some hand-made FindPCRE.cmake-like files over GitHub, but it's difficult to tell if there's really a point in including any of them here (probably current minimal support using find_library()/find_path() is sufficient).

@danmar danmar merged commit 5c102a0 into cppcheck-opensource:main Mar 30, 2021
@DGarry82 DGarry82 deleted the find-pcre-header branch March 30, 2021 15:01
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