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

Remove Windows dependency (disable uuid_time_generator by default) #34

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

EvanBalster
Copy link
Contributor

This PR disables uuid_time_generator by default, allowing it to be re-enabled by defining UUID_TIME_GENERATOR.

If neither UUID_TIME_GENERATOR or UUID_SYSTEM_GENERATOR are included, Windows.h will not be included. This avoids some namespace trouble and compile-time overhead.

I was originally planning to add a disable macro rather than an enable macro, but noticed the warning in the source against using uuid_time_generator in production. Nevertheless, this might break compatibility with some existing projects.

@mariusbancila
Copy link
Owner

Can you please fix the unit tests? With these changes, the build fails:

C:\projects\stduuid\test\test_generators.cpp(260): error C2065: 'uuid_time_generator': undeclared identifier [C:\projects\stduuid\build\test\test_stduuid.vcxproj]
C:\projects\stduuid\test\test_generators.cpp(260): error C2146: syntax error: missing ';' before identifier 'gen' [C:\projects\stduuid\build\test\test_stduuid.vcxproj]
C:\projects\stduuid\test\test_generators.cpp(260): error C2065: 'gen': undeclared identifier [C:\projects\stduuid\build\test\test_stduuid.vcxproj]
C:\projects\stduuid\test\test_generators.cpp(261): error C3861: 'gen': identifier not found [C:\projects\stduuid\build\test\test_stduuid.vcxproj]
C:\projects\stduuid\test\test_generators.cpp(262): error C3861: 'gen': identifier not found [C:\projects\stduuid\build\test\test_stduuid.vcxproj]
C:\projects\stduuid\test\test_generators.cpp(275): error C3861: 'gen': identifier not found [C:\projects\stduuid\build\test\test_stduuid.vcxproj]

@EvanBalster
Copy link
Contributor Author

Fixed (eliminate the test when UUID_TIME_GENERATOR is not defined).

I forgot to mention: this pull request relates to issue #33.

@mariusbancila mariusbancila merged commit 9e5162c into mariusbancila:master Jun 14, 2021
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