This commit adds the ability to read / write attributes corresponding
to STL containers or pair structures. Testcases are included and
demonstrate how to add container or pair member variables as
attributes to your class.
* Change version tag and ClosestTag values to be ns-3.xx
* Fix string values to have the proper format
* Allow check-version to proceed even if git task is not present
* Remove git package requirement from Docker containers
* Create git_ns3_version_info task only when HAVE_NS3_REPO is defined
* Change tag glob from ns-3* to ns-3.[0-9]*
* Use version tag to make output consistent with waf --check-version
Changes
* Adds a new class named Version to the core module
* Adds a template file to the core module named version-defines.h.in
* Adds --PrintVersion and --version arguments to the CommandLine class.
* Creates a new waf tool which queries the local git repository and extracts build information from itCreate a waf task to extract version information from git repository
This has a stub for Remove, which just cancels the event.
In turn this causes the simulator test case to fail, because of
the sanity check at the end of DefaultSimulatorImpl::Run.
*) Platform was no longer recognized as a attribute of Options. Used waf
Utils call to obtain unversioned platform name.
*) Task classes renamed from <taskname>_task to <taskname>.
Waf was not finding the classes when named with _task suffix.
*) Waf removed check option for 'type_name' check.
Added explicit embedded code snippet based on previous Waf versions to perform uint128 checks.
*) Waf source attribute is now strings, need to convert to nodes to retrieve parent node.
# Orig 1.8.19 testdir = self.source[-1].parent.path_from(self.bld.srcnode)
testdir = self.to_nodes(self.source[-1])[0].parent.path_from(self.bld.srcnode)
Fixed clang-3.4 unused function warnings in optimized builds like the following:
"""
../examples/energy/energy-model-example.cc:39:1: error: unused function
'PrintReceivedPacket' [-Werror,-Wunused-function]
PrintReceivedPacket (Address& from)
^
1 error generated.
"""
Implemented "if (false)" trick inside NS_LOG* macros for optimized builds.
"sizeof()" trick might be a little better but it produces the following
warning with clang-3.4:
"""
../examples/energy/energy-model-example.cc:39:1: error: function
'PrintReceivedPacket' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
PrintReceivedPacket (Address& from)
^
1 error generated.
"""
Macros from log.h, that depend on NS3_LOG_ENABLE, were moved to log-macros-enabled.h and log-macros-disabled.h to make log.h smaller.
This is a massive upgrade removing almost all pre-waf 1.6 script code. In addition, this does away with custom pkgconfig.py script for making .pc files and replaces it with waf's builtin mechanism.
Massive thanks to Alex Afanasyev for ideas and bugfixing, to Alina Quereilhac for bugfixing and testing, and to Tom Henderson for thorough testing.