Split the deprecated available check from setting macro values.

This commit is contained in:
Stephen Kelly
2011-08-11 18:17:12 +02:00
parent 1590d5fe4f
commit 9554e1013e
4 changed files with 21 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ endmacro()
static_variant_build_pass("return libshared_and_static_exported();" "Failed to build static variant")
shared_variant_build_pass("return libshared_and_static_exported();" "Failed to build shared variant")
if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES Borland)
if (COMPILER_HAS_DEPRECATED)
shared_variant_build_fail("return libshared_and_static_deprecated();" "Built shared deprecated variant")
static_variant_build_fail("return libshared_and_static_deprecated();" "Built static deprecated variant")
else()

View File

@@ -9,7 +9,7 @@ endmacro()
shared_build_pass("Libshared l; return l.libshared_exported();" "Failed to build exported")
if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES Borland)
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.")

View File

@@ -9,7 +9,7 @@ endmacro()
static_build_pass("Libstatic l; return l.libstatic_exported();" "Failed to build exported.")
if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES Borland)
if (COMPILER_HAS_DEPRECATED)
static_build_fail("Libstatic l; return l.libstatic_deprecated();" "Built use of deprecated class method. This should not be possible.")
static_build_fail("libstatic_deprecated();" "Built use of deprecated function. This should not be possible.")
else()