diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-12-11 00:01:50 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-12-15 10:22:19 (GMT) |
commit | 4017db13aa54527e979f80f059b9aab1b344734e (patch) | |
tree | ac32315a438fd81911dc859a7abecb971a20b590 /Tests/Module/GenerateExportHeader/libsharedtest | |
parent | a2489ce49c0cbf5582a29ef8c4a0d9728994f465 (diff) | |
download | CMake-4017db13aa54527e979f80f059b9aab1b344734e.zip CMake-4017db13aa54527e979f80f059b9aab1b344734e.tar.gz CMake-4017db13aa54527e979f80f059b9aab1b344734e.tar.bz2 |
Speed up the GenerateExportHeader unit test (#14453).
Instead of running many small tests with many cmake projects, simply
compare the generated export header against a reference.
Remove the helper macros and the try_compiles which are duplicates
of the library build tests.
Diffstat (limited to 'Tests/Module/GenerateExportHeader/libsharedtest')
-rw-r--r-- | Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt b/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt deleted file mode 100644 index 2a97d8f..0000000 --- a/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ - -macro(shared_build_pass Source Message) - build_pass("libshared.h" "libshared" "libshared" "${Source}" ${Message}) -endmacro() - -macro(shared_build_fail Source Message) - build_fail("libshared.h" "libshared" "libshared" "${Source}" ${Message}) -endmacro() - -shared_build_pass("Libshared l; return l.libshared_exported();" "Failed to build exported") -shared_build_pass("return libshared_exported();" "Failed to build exported function.") - -# if (COMPILER_HAS_DEPRECATED) -# shared_build_fail("Libshared l; return l.libshared_deprecated();" "Built use of deprecated class method. This should not be possible.") -# else() -# shared_build_pass("Libshared l; return l.libshared_deprecated();" "Built use of deprecated class method. This should not be possible.") -# endif() -if (COMPILER_HAS_HIDDEN_VISIBILITY) - shared_build_fail("Libshared l; return l.libshared_excluded();" "Built use of excluded class method. This should not be possible.") -else() - # There is no MSVC equivalent to hiding symbols. - shared_build_pass("Libshared l; return l.libshared_excluded();" "Built use of excluded class method. This is possible on MSVC.") -endif() - -if (WIN32 OR COMPILER_HAS_HIDDEN_VISIBILITY) - shared_build_fail("LibsharedNotExported l; return l.libshared();" "Built use of not-exported class method. This should not be possible.") - shared_build_fail("LibsharedNotExported l; return l.libshared_not_exported();" "Built use of not-exported class method. This should not be possible.") - shared_build_fail("LibsharedNotExported l; return l.libshared_excluded();" "Built use of not-exported class method. This should not be possible.") - shared_build_fail("LibsharedExcluded l; return l.libshared();" "Built use of excluded class method. This should not be possible.") - shared_build_fail("LibsharedExcluded l; return l.libshared_not_exported();" "Built use of excluded class method. This should not be possible.") - shared_build_fail("LibsharedExcluded l; return l.libshared_excluded();" "Built use of excluded class method. This should not be possible.") - - shared_build_fail("return libshared_excluded();" "Built use of excluded function. This should not be possible.") - shared_build_fail("return libshared_not_exported();" "Built use of not-exported function. This should not be possible.") -else() - shared_build_pass("LibsharedNotExported l; return l.libshared();" "Built use of not-exported class method.") - shared_build_pass("LibsharedNotExported l; return l.libshared_not_exported();" "Built use of not-exported class method.") - shared_build_pass("LibsharedNotExported l; return l.libshared_excluded();" "Built use of not-exported class method.") - shared_build_pass("LibsharedExcluded l; return l.libshared();" "Built use of excluded class method.") - shared_build_pass("LibsharedExcluded l; return l.libshared_not_exported();" "Built use of excluded class method.") - shared_build_pass("LibsharedExcluded l; return l.libshared_excluded();" "Built use of excluded class method.") - - shared_build_pass("return libshared_excluded();" "Built use of excluded function.") - shared_build_pass("return libshared_not_exported();" "Built use of not-exported function.") -endif() |