quick question: I’ve seen some warnings in our linkdef files about unused class rules. Those are great, however the warning is usually just
Warning: Unused class rule: ClassName
which makes it a bit hard to parse in our build system. Is there a way foreseen to make this warning gcc compatible with gcc? Something like
path/to/Linkdef.h:N:M: warning: Unused class rule: ClassName
Maybe via rootcling command line argument? This would be very helpful, especially with multi-core builds it becomes very hard to find the offending Linkdef.h otherwise.
Sure thing, the command is (slightly abbreviated for include paths and defines)
rootcling -f build/Linux_x86_64/opt/framework_dataobjects_include_Dict.cc \
-std=c++17 -O3 [...lots of -I...] \
-noIncludePaths \
-rmf "build/Linux_x86_64/opt/framework_dataobjects_include_Dict.rootmap" \
-rml libframework.so \
-D_PACKAGE_=\"framework\" [...some more defines...] \
include/framework/dataobjects/RelationElement.h \
[...more files in the same directory...] \
framework/dataobjects/include/linkdef.h
so we would be fine with the name of the linkdef file to be reported exactly as given to rootcling, no need for any path manipulation. Also, for simplicity line number and column number can be 0 if they are not available.
But also I just think it’s beneficial to keep to a format which is used by gcc+clang anyway. Not only would we not have to modify our parser but nobody else would have to either.
But we can live with both solutions. Or with just a line number and no column. As long as the filename is included as shown above we will manage