-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 Cygwin CMake Build #2101
Fix Cygwin CMake Build #2101
Conversation
such that necessary cmake variables to detect Cygwin are defined when setting the C++ standard and we can distinguish.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
|
CLAs look good, thanks! |
PiperOrigin-RevId: 233096223
merged now |
PiperOrigin-RevId: 233096223
PiperOrigin-RevId: 233096223
PiperOrigin-RevId: 233096223
PiperOrigin-RevId: 233096223
PiperOrigin-RevId: 233096223
@gennadiycivil I just tested and it works perfect thanks! I could probably contribute CI on Cygwin using appveyor if there's any interest. |
Why?
Based on the findings I wrote here I'm fixing the global CMakeLists file such that building under Cygwin also works out of the box e.g. when following the readme and including the repo in your CMake project.
What?
Really?
Here's the output after the following commands in the freshly cloned repo wit the latest Cygwin environment:
Before change:


After change:
Additional info
Building gtest without any C++ standard definitions works fine on Cygwin, probably the defaults are just right. That's also why diectly building it using the
CMakeLists.txt
files in thegoogletest
orgooglemock
folder is fine. I'm fixing the global one because I intend to use it and it's also frustrating to new users to first have a failing build.