You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the compiler flag conditional in CMakeLists.txt is inverted. It currently reads
if (MSVC)
add_definitions(-Wall)
else ()
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
endif()
It should actually be the other way around (the -D_SCL_SECURE_NO_WARNINGS flag only makes sense for MSVC)
if (MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
else ()
add_definitions(-Wall)
endif()
In fact, it should actually read
if (MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
else ()
add_definitions(-Wall -Wno-long-long)
endif()
It looks like what happened is that the conditional was originally in the incorrect order (someone tried to mimic the order of the premake file where the condition is equivalent to NOT MSVC). That didn't work on Windows, so in commit c6cde00 the -Wno-long-long flag was removed to make it barely work. MSVC does understand the -Wall flag, but on Windows this causes all warnings to become active, unlike in GCC/Clang where only a sensible subset become active, so the code builds on Windows, but it spits out a very large number of warnings.
Anyway, all that needs to happen is that the flags should be swapped and the -Wno-long-long flag should probably be added back in to keep consistency with premake.
I apologize for not issuing this as a pull request, but I'm really unfamiliar with Mercurial.
The text was updated successfully, but these errors were encountered:
Original report by Jacob Howard (Bitbucket: havoc-io, GitHub: havoc-io).
It appears that the compiler flag conditional in CMakeLists.txt is inverted. It currently reads
It should actually be the other way around (the
-D_SCL_SECURE_NO_WARNINGS
flag only makes sense for MSVC)In fact, it should actually read
It looks like what happened is that the conditional was originally in the incorrect order (someone tried to mimic the order of the premake file where the condition is equivalent to
NOT MSVC
). That didn't work on Windows, so in commit c6cde00 the-Wno-long-long
flag was removed to make it barely work. MSVC does understand the-Wall
flag, but on Windows this causes all warnings to become active, unlike in GCC/Clang where only a sensible subset become active, so the code builds on Windows, but it spits out a very large number of warnings.Anyway, all that needs to happen is that the flags should be swapped and the
-Wno-long-long
flag should probably be added back in to keep consistency with premake.I apologize for not issuing this as a pull request, but I'm really unfamiliar with Mercurial.
The text was updated successfully, but these errors were encountered: