-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Replace POSIX directory operations by Boost Filesystem #1090
Conversation
Signed-off-by: Gregor Jasny <[email protected]>
@@ -82,14 +82,14 @@ if (${USE_ALTERNATE_FORMATS} STREQUAL "ON") | |||
endif () | |||
|
|||
# Find all the required libraries and programs. | |||
if (${USE_BOOST} STREQUAL "ON") | |||
if (${USE_BOOST} STREQUAL "ON" OR ${BUILD_GEOCODER} STREQUAL "ON") |
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.
This doesn't look right to me.
We can't replace "USE_BOOST" check with "USE_BOOST OR BUILD_GEOCODER" when the check is guarding includes for Boost headers.
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.
I take this back. In this context this is doing the right thing. My initial reading was wrong.
Still need to review the rest of the code. Just added an initial comment. |
@roubert could you please take a look at this CL in terms of C++? |
@@ -31,6 +30,7 @@ | |||
#include <string> | |||
#include <utility> | |||
#include <vector> | |||
#include <boost/filesystem.hpp> |
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.
This code needs to continue to work without Boost.
Please follow the pattern in https://github.com/googlei18n/libphonenumber/blob/master/cpp/src/phonenumbers/base/memory/scoped_ptr.h to use Boost "#if defined(I18N_PHONENUMBERS_USE_BOOST)" and fall back to the current code based on dirent.h.
line 58 of tools/cpp/CMakeLists.txt
instead of:
so that generate_geocoding_data_test also gets linked with Boost |
Hi @gjasny, Are you interested in / able to help us get this PR merged in the foreseeable future? Related issues in case anyone could help collaborate there:
|
This is infeasible given the lack of reviewers or a response. We don't actively maintain windows builds and we'd need someone else in the open-source community to test and help review this PR. Please see the known Windows issues, maybe someone else there or in the |
To support compiling the generate_geocoding_data generator on non-POSIX systems like Windows I replaced the POSIX code with Boost Filesystem. After the change the generator produes exactly the same output as before. This should close Issue #824.
This change is