Description
The resolution adds a "header-check" task to build.xml to generate mock C++ files to check that headers explicitly include all dependencies and are in conformance with GCC's =Weffc++ option which checks the source code against rules from Scott Meyer's "Effective C++" books.
To use, both ant-contrib.jar and cpptasks.jar for the Ant-contrib project must be on the classpath.
ant header-check
Will copy all header files from include to build/header-check, will then generate .cpp files which look like:
#include "/home/whoever/logging-log4cxx/include/log4cxx/logger.h"
#include "/home/whoever/logging-log4cxx/include/log4cxx/logger.h"
and compile them with the -Wall and -Weffc++ options.
The current implementation of -Weffc++ will report errors for most STL implementations. To suppress these errors, non-functional "mock" declarations for some STL include files were added in the mock directory.