-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[SH] Fix build warnings #1960
[SH] Fix build warnings #1960
Conversation
Anyone has an idea why |
I also don't have an environment where I can use MSVC right now. |
Fixed. |
The build seems to fail with this as well. Or am I missing something? |
CMakeLists.txt
Outdated
@@ -1,6 +1,12 @@ | |||
# For MSVC_RUNTIME_LIBRARY | |||
cmake_minimum_required(VERSION 3.15) | |||
|
|||
if (MSVC) |
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.
Hi, you need to define what MSVC
is here
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.
It should be predefined by cmake
. See: https://cmake.org/cmake/help/latest/variable/MSVC.html
But it isn't in our case.
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.
Wait. I haven't tried this last time. Doesn't work
e6f4572
to
2e15189
Compare
@Rot127 I think I might know the reason - this variable probably doesn't work before the See also https://stackoverflow.com/questions/41692725/cmake-doesnt-recognize-msvc-compiler#41693234 |
This was it. Thanks! |
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.
LGTM
Great, Thank you! |
These commits add several build warning options to
CMakeList.txt
and fixes build warnings for the SH arch.Two unused functions are removed and a
parantheses
/int-in-bool-contexxt
warning is fixed.@ysat0 Could you please take a look at it as well?