Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with PDAL < 2.5 #157

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

wonder-sk
Copy link
Contributor

Build with PDAL < 2.5 was failing like this:

/home/martin/qgis/git-master/external/untwine/untwine/Untwine.cpp: In function ‘void untwine::cleanup(const string&, bool)’:
/home/martin/qgis/git-master/external/untwine/untwine/Untwine.cpp:112:10: error: ‘regex’ is not a member of ‘std’
  112 |     std::regex re("[0-9]+-[0-9]+-[0-9]+-[0-9]+.bin");
      |          ^~~~~
/home/martin/qgis/git-master/external/untwine/untwine/Untwine.cpp:113:10: error: ‘smatch’ is not a member of ‘std’; did you mean ‘search’?
  113 |     std::smatch sm;
      |          ^~~~~~
      |          search
/home/martin/qgis/git-master/external/untwine/untwine/Untwine.cpp:117:18: error: ‘regex_match’ is not a member of ‘std’
  117 |         if (std::regex_match(f, sm, re))
      |                  ^~~~~~~~~~~
/home/martin/qgis/git-master/external/untwine/untwine/Untwine.cpp:117:33: error: ‘sm’ was not declared in this scope; did you mean ‘tm’?
  117 |         if (std::regex_match(f, sm, re))
      |                                 ^~
      |                                 tm
/home/martin/qgis/git-master/external/untwine/untwine/Untwine.cpp:117:37: error: ‘re’ was not declared in this scope
  117 |         if (std::regex_match(f, sm, re))
      |                                     ^~

It looks like since PDAL/PDAL@8986cd8 (first included in 2.5) the pdal_types.hpp file contains #include <regex> that is now needed by Untwine.cpp. Let's include it in Untwine.cpp to make sure it works with earlier PDAL releases as well.

wonder-sk added a commit to wonder-sk/QGIS that referenced this pull request Feb 9, 2024
nyalldawson pushed a commit to qgis/QGIS that referenced this pull request Feb 10, 2024
@hobu hobu merged commit 7401b13 into hobuinc:main Feb 12, 2024
3 checks passed
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.

2 participants