(core): remove warnings in sight core
What does this MR do?
-
Remove a lot of warnings in Sight core and build the main sight core lib with the new cmake option
WARNINGS_AS_ERRORS
-
Warnings in Sight core was mainly due to the call of macro with fewer parameters than required.
-
We have now a macro
fwCoreClassMacro
with three versions:- fwCoreClassMacro(_class);
- fwCoreClassMacro(_class, _parentClass);
- fwCoreClassMacro(_class, _parentClass, _factory);
-
The macro
fwCoreServiceClassDefinitionsMacro
used in services has been simplified and replaced byfwCoreServiceMacro(_class, _parentClass);
-
All old deprecated macros have been placed in the
macros-legacy.hpp
file (still included bymacros.hpp
for now - until Sight 22.0) -
List of new projects that no longer generate warnings during compilation:
- arData
- arDataTest
- fwCom
- fwComTest
- fwCore
- fwCoreTest
- fwData
- fwDataTest
- fwMedData
- fwMedDataTest
- fwRuntime
- fwRuntimeTest
- fwServices
- fwServicesTest
- fwTools
- fwToolsTest
- fwRenderOgre
- fwRenderOgreTest
How to test it?
- Build Sight an run unit tests.
Data
- no required data
Some results
- the list of projects with the
WARNINGS_AS_ERRORS
option no longer generate warnings at compile time - warnings as below have normally disappeared:
warning C4003: not enough arguments for function-like macro invocation'xxxx''
Additional tests to run
-
Build on Windows -
Build on Linux -
Build on macOS
Associated Issue
Closes #371 (closed)