-
Notifications
You must be signed in to change notification settings - Fork 417
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
Explicitly require VS2015 or greater #189
Conversation
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.
Looks good, one minor comment.
if(MSVC) | ||
if(MSVC_VERSION VERSION_LESS 1900) | ||
message(FATAL_ERROR "${PROJECT_NAME} requires Visual Studio 2015 or greater.") | ||
endif() | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /W1 /bigobj") | ||
if(FCL_TREAT_WARNINGS_AS_ERRORS) | ||
add_definitions(/WX) | ||
endif(FCL_TREAT_WARNINGS_AS_ERRORS) |
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.
Consider endif()
for consistency.
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.
Actually, I don't know which one is the convention here. Some endif()
contain the parameter while some don't. Do we want to use endif()
for other places as well?
Edit: I personally prefer endif()
because sometimes it's not clear which parameter should be used. For example:
if(SOME_CONDITION)
...
elseif(SOME_OTHER_CONDITION)
...
endif(SOME_CONDITION? or SOME_OTHER_CONDITIONS?)
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 agree! endif()
is always better, IMO. That is very clear when the original condition is some complicated expression!
I removed conditions from |
Related issue: #184