Closed victimsnino closed 1 year ago
Looks like you use cmake -B "build/" -S . --warn-uninitialized -Werror=dev
or an equivalent configure preset. We can get rid of this error by providing an explicit option(BUILD_SHARED_LIBS ...)
.
At the moment, you can get rid of this error by either changing your warnings options (remove --warn-uninitialized
or -Werror=dev
or add -Wno-error=dev
) or explicitly defining the variable (-D BUILD_SHARED_LIBS:BOOL="ON"
or -DBUILD_SHARED_LIBS=OFF
). Using SNITCH_HEADER_ONLY
also helps, see https://github.com/cschreib/snitch/blob/main/CMakeLists.txt.
I'm getting it during configuring my own project where snitch fetched during configuration. So, suppression of all cmake warnings is not an option - I want to see my own :) Fixed by defining BUILD_SHARED_LIBS but ideally, I expect, snitch should fix it by its own
Thanks both for reporting and pinpointing the issue. I've never used CMake warning levels, so I had assumed that CMake was always defining BUILD_SHARED_LIBS
(to YES
or NO
). Should have know better than to assume something about CMake :)
Indeed there is something we can do to fix the warning on our end, I'll prepare a PR. I might turn on these warnings in CI as well, so it doesn't happen again.
This is now fixed in the main branch. I'll probably issue another release (1.2.1) when more fixes have accumulated.
v1.2.1 is now released with the fix. Thanks!
Hi. With last version of snitch i'm getting following error during configuration: