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
{{ message }}
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.
I just double checked (because of missing warnings) and I think plain C is not supported indeed (e.g. -Wmissing-prototypes, -Wstrict-prototypes, and -Wold-style-definition are not generated with ENABLE ALL). Is support for plain C planned for sugar?
Here is a list of warnings for GCC (C and Objective-C only warnings are marked as such).
Is there any particular reason not to support plain C compiler in the sugar_generate_warning_flags function?
No, however flags for C target will differs from C++ targets.
Is support for plain C planned for sugar?
I'm not planning to improve this part of Sugar because better approach is to implement this in CMake itself. The design is ready: https://cmake.org/pipermail/cmake-developers/2016-April/028279.html however I have not enough free time to implement it. There is no plans in near future to do it.
set(is_gcc ${CMAKE_COMPILER_IS_GNUCXX} OR ${CMAKE_COMPILER_IS_GNUCC})
is plain wrong as set() does not evaluate the variables and instead creates a list. If anyone wants to take advantage of this quick and dirty fix, rather use:
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
set(is_gcc TRUE)
else()
set(is_gcc FALSE)
endif()
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there any particular reason not to support plain C compiler in the
sugar_generate_warning_flags
function? I changed line 28 fromto
and it and it seems to work just fine so far.
Thanks for the nice module!
The text was updated successfully, but these errors were encountered: