-
Notifications
You must be signed in to change notification settings - Fork 138
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
Using -Werror on OSX causes compilation error #48
Comments
Post scriptum: If |
I get this too. vcpkg/buildtrees/crossguid/src/365d430337-f320045b03.clean/src/guid.cpp:403:7: error: unused function 'swap' [-Werror,-Wunused-function] |
The -Werror option should be removed from the CMakeLists.txt or a way to disable it in case. An unused function warning should never be treated as an error! (swap function causing the build to fail!) Currently, it makes it impossible to include this project using FetchContent_Declare(crossguid GIT_REPOSITORY https://github.com/graeme-hill/crossguid.git) when compiling for anything else than Windows (unfortunately other systems exist :-)) |
Please see the following log, https://travis-ci.org/inexorgame/entity-system/jobs/502307832#L1700
This is caused by
-Wunused
and should not cause a linker error. The idiomatic C++17 way to solve this is using maybe_unused.Currently
crossguid/CMakeLists.txt
Line 45 in b151b7d
crossguid
(commit b151b7d) as mentioned in #47A suggested quick fix is disabling
-Werror
(which isn't amazing anyways, see this post), but we would hope to be able to switch back tocrossguid/master
as soon as possible, with unused functions being marked as such.The text was updated successfully, but these errors were encountered: