The Watcom compiler does not have stream operators for std::string.
Since KWSys no longer provides the operators for us, just use c_str()
to avoid the problem and allow the test to compile on Watcom.
Commit 899458ab (Tests: Cover NO_SONAME property for SHARED libraries,
2015-08-20) introduced a few new ExportImport tests, and the
check_lib_{no}soname.cmake scripts that parse readelf(1)'s output.
Make the regular expression matching the SONAME line output by readelf
less strict, as the output format varies across implementations: GNU
binutils' readelf is the only one to write each ELF header within
parentheses (which the previous regular expression expected). The new
tests were thus failing when either Fedora's elfutils (eu-readelf) or
elftoolchain's readelf (present on recent FreeBSD versions) were being
used, as they both list the headers without parentheses.
The same issue also affected Tests/Plugin's check_mod_soname.cmake, so
fix that one as well -- the only reason the test was not failing is that
it tested that the regular expression did not match, which was always
the case with a non-binutils readelf.
Old versions of aCC need a special compiler flag to get full C++98 template
support as e.g. CMake itself or the Complex and ComplexOneConfig tests need.
The same versions need a special flag to get a proper C++ library, too.
Teach the Plugin test to check that the NO_SONAME target property works
as documented. Check that the IMPORTED targets are written with the
correct properties. When readelf is available use it to check the
actual binary files for SONAME fields.
If an executable marks symbols with __declspec(dllexport) then VS
creates an import library for it. However, it forgets to create the
directory that will contain the import library if it is different from
the location of the executable. We work around this VS bug by creating
a pre-build event on the executable target to make the directory.