CMake/Tests/RunCMake/GenerateExportHeader
Matthew Woehlke 8f95b93b41 Tests: Add failure test for GenerateExportHeader
Modify notation of statements in the GenerateExportHeader test expected
to result in link errors. Modify script used to build the test to also
generate a suite of modified sources, each having exactly one of the
failing lines enabled, and to generate EXCLUDE_FROM_ALL executables for
the same. Modify RunCMake script used to drive the test to read the list
of such executables and try to build each of them, verifying that they
do in fact fail to build.

This will verify that the _NO_EXPORT macros are working as expected, and
will also catch errors like the one that commit 0cbaaf2d
(GenerateExportHeader: Fix add_compiler_export_flags regression,
2016-09-01) fixed.

When setting up the failure tests for GenerateExportHeader, check if the
compiler actually hides non-exported stuff.  If not, the failure tests
won't fail, and will cause the overall test to fail.  Since this
typically is only the case for very old compilers, simply skipping them
as opposed to trying to do something more fine grained seems reasonably
safe.
2016-09-12 10:27:45 -04:00
..
c_identifier Tests: Cleanup RunCMake.GenerateExportHeader somewhat 2016-09-05 09:45:42 -04:00
lib_shared_and_static Tests: Cleanup RunCMake.GenerateExportHeader somewhat 2016-09-05 09:45:42 -04:00
libshared Tests: Cleanup RunCMake.GenerateExportHeader somewhat 2016-09-05 09:45:42 -04:00
libstatic Tests: Cleanup RunCMake.GenerateExportHeader somewhat 2016-09-05 09:45:42 -04:00
nodeprecated Tests: Cleanup RunCMake.GenerateExportHeader somewhat 2016-09-05 09:45:42 -04:00
reference Tests: Port GenerateExportHeader test to RunCMake infrastructure 2016-09-05 09:45:42 -04:00
CMakeLists.txt Tests: Cleanup RunCMake.GenerateExportHeader somewhat 2016-09-05 09:45:42 -04:00
GEH-build-stderr.txt Tests: Port GenerateExportHeader test to RunCMake infrastructure 2016-09-05 09:45:42 -04:00
GEH-failures.cmake Tests: Add failure test for GenerateExportHeader 2016-09-12 10:27:45 -04:00
GEH-link-error-result.txt Tests: Add failure test for GenerateExportHeader 2016-09-12 10:27:45 -04:00
GEH-link-error-stderr.txt Tests: Add failure test for GenerateExportHeader 2016-09-12 10:27:45 -04:00
GEH.cmake Tests: Add failure test for GenerateExportHeader 2016-09-12 10:27:45 -04:00
RunCMakeTest.cmake Tests: Add failure test for GenerateExportHeader 2016-09-12 10:27:45 -04:00
exportheader_test.cpp Tests: Add failure test for GenerateExportHeader 2016-09-12 10:27:45 -04:00