diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-08-12 08:42:16 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-08-12 08:42:16 (GMT) |
commit | 9aab2aa77f12a938ef4a819ebb9830a1918f65ce (patch) | |
tree | 7ea3bb2756a22ca0ba1d68a4ee2bf747e8ba8cf8 /Tests/Module | |
parent | 856bdb317bc0d38327a7a9c7e9105ee1cd39f18a (diff) | |
download | CMake-9aab2aa77f12a938ef4a819ebb9830a1918f65ce.zip CMake-9aab2aa77f12a938ef4a819ebb9830a1918f65ce.tar.gz CMake-9aab2aa77f12a938ef4a819ebb9830a1918f65ce.tar.bz2 |
Expect the tests to pass if hidden visibilty is not enabled.
Diffstat (limited to 'Tests/Module')
-rw-r--r-- | Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt | 29 |
2 files changed, 27 insertions, 9 deletions
diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt b/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt index 1401eec..28d6c65 100644 --- a/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt +++ b/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt @@ -25,4 +25,9 @@ else() static_variant_build_pass("return libshared_and_static_deprecated();" "Built static deprecated variant") endif() static_variant_build_pass("return libshared_and_static_not_exported();" "Failed to build static not exported variant") -shared_variant_build_fail("return libshared_and_static_not_exported();" "Built shared not exported variant") + +if (WIN32 OR COMPILER_HAS_HIDDEN_VISIBILITY) + shared_variant_build_fail("return libshared_and_static_not_exported();" "Built shared not exported variant") +else() + shared_variant_build_pass("return libshared_and_static_not_exported();" "Built shared not exported variant") +endif() diff --git a/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt b/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt index b763036..288089e 100644 --- a/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt +++ b/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt @@ -20,12 +20,25 @@ 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() -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.") +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() |