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.
Fixes #1157.
Changes proposed in this pull request:
pg_config
when searching for POSTGRESQL_EXECUTABLE by changing the search order to avoid matching an unrelated executable@pgRouting/admins
This PR is the minimal required change to the logic to fix building on Mac in several typical constellations. I would however rather prefer the following bigger change:
pg_config
, find that according to PATH, overridable byPOSTGRESQL_BIN
Reason:
pg_config
, otherwisePOSTGRESQL_LIBRARIES
andPOSTGRESQL_VERSION_STRING
could not be set, andPOSTGRESQL_FOUND
would resultFALSE
POSTGRESQL_INCLUDE_DIR
POSTGRESQL_LIBRARIES
andPOSTGRESQL_EXECUTABLE
belonging to different installations which cannot work-DPOSTGRESQL_BIN=...
to point to a particular installation not in path of whichpg_config
would then control the other directoriesCon:
pg_config
- this would now require to explicitly specify all ofPOSTGRESQL_INCLUDE_DIR
,POSTGRESQL_LIBRARIES
,POSTGRESQL_EXECUTABLE
,POSTGRESQL_VERSION_STRING
as cmake parametersIf you agree, I'll update the PR to reflect the wider change.