-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Check triggers cmake error unnecessarily #4150
Conversation
For Visual Studio 2017 and prior, the default wasn't x64 so generator platform couldn't be left blank. |
sounds good to me! |
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.
Let's get this merged ASAP to minimize hassles as we move to newer versions.
Thanks, can you approve the PR @legleux ? |
Builds/CMake/RippledSanity.cmake
Outdated
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio" AND | ||
NOT ("${CMAKE_GENERATOR}" MATCHES .*Win64.*)) | ||
("${CMAKE_GENERATOR_PLATFORM}" MATCHES .*Win32.*)) | ||
message (FATAL_ERROR | ||
"Visual Studio 32-bit build is not supported. Use -G\"${CMAKE_GENERATOR} Win64\"") |
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.
How about this instead?
if (MSVC AND CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
message (FATAL_ERROR
"Visual Studio 32-bit build is not supported. Use -A x64")
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.
Yes, looks better. I'll do a sanity check and update it.
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.
@thejohnfreeman I did the change, removing the -A x64
as it does not seem to work.
Incorrect error for cmake execution on windows when platform unspecified or x64
Context of Change
When using cmake-gui to generate solution files on windows, the default platform is stated to be x64, so it is natural to leave the field unfilled, but even among the proposed choices, Win64 is nowhere to be found, we see only x64.
So whether we leave the field blank, or select x64 in the dropdown, cmake generation fails because it checks for the presence of
Win64
.This change makes the generation of solution files more user friendly on windows, by not causing an error unless we find
Win32
.Type of Change