[Cmake-commits] CMake branch, next, updated. v2.8.5-1493-gf404518

Stephen Kelly steveire at gmail.com
Wed Aug 10 16:20:52 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  f40451894d190cfe2196fed4b71e9f9e74d31206 (commit)
       via  7924c1d6a8db87ded487e744ba3e8881e8336d00 (commit)
      from  282061384a9cfea31b38f7ef83c6f96491f1c33d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f40451894d190cfe2196fed4b71e9f9e74d31206
commit f40451894d190cfe2196fed4b71e9f9e74d31206
Merge: 2820613 7924c1d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 10 16:20:51 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 10 16:20:51 2011 -0400

    Merge topic 'generate_export_header' into next
    
    7924c1d Another attempt at fixing Borland.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7924c1d6a8db87ded487e744ba3e8881e8336d00
commit 7924c1d6a8db87ded487e744ba3e8881e8336d00
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 10 22:19:39 2011 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Aug 10 22:19:39 2011 +0200

    Another attempt at fixing Borland.
    
    Apparently it still needs to be exported, but only declspec(deprecated)
    does not work.

diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 5ecb807..c921d89 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -160,10 +160,8 @@ macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY)
 
   if(NOT ${type} STREQUAL "STATIC_LIBRARY")
     if(WIN32)
-      if (NOT (${CMAKE_CXX_COMPILER_ID} MATCHES Borland))
-        set(DEFINE_EXPORT "__declspec(dllexport)")
-        set(DEFINE_IMPORT "__declspec(dllimport)")
-      endif()
+      set(DEFINE_EXPORT "__declspec(dllexport)")
+      set(DEFINE_IMPORT "__declspec(dllimport)")
     elseif(COMPILER_HAS_HIDDEN_VISIBILITY AND USE_COMPILER_HIDDEN_VISIBILITY)
       set(DEFINE_EXPORT "__attribute__((visibility(\"default\")))")
       set(DEFINE_IMPORT "__attribute__((visibility(\"default\")))")
diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt b/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt
index 2030de6..d25eed0 100644
--- a/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/lib_shared_and_statictest/CMakeLists.txt
@@ -17,7 +17,12 @@ 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")
-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")
+if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES Borland)
+  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()
+  shared_variant_build_pass("return libshared_and_static_deprecated();" "Built shared deprecated variant")
+  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")
diff --git a/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt b/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt
index 7a05205..9edc53f 100644
--- a/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/libsharedtest/CMakeLists.txt
@@ -9,7 +9,11 @@ endmacro()
 
 shared_build_pass("Libshared l; return l.libshared_exported();" "Failed to build exported")
 
-shared_build_fail("Libshared l; return l.libshared_deprecated();" "Built use of deprecated class method. This should not be possible.")
+if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES Borland)
+  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()
diff --git a/Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt b/Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt
index 58b875a..a41b168 100644
--- a/Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt
@@ -9,5 +9,7 @@ endmacro()
 
 static_build_pass("Libstatic l; return l.libstatic_exported();" "Failed to build exported.")
 
-static_build_fail("Libstatic l; return l.libstatic_deprecated();" "Built use of deprecated class method. This should not be possible.")
+if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES Borland)
+  static_build_fail("Libstatic l; return l.libstatic_deprecated();" "Built use of deprecated class method. This should not be possible.")
+endif()
 static_build_fail("libstatic_deprecated();" "Built use of deprecated function. This should not be possible.")

-----------------------------------------------------------------------

Summary of changes:
 Modules/GenerateExportHeader.cmake                 |    6 ++----
 .../lib_shared_and_statictest/CMakeLists.txt       |    9 +++++++--
 .../libsharedtest/CMakeLists.txt                   |    6 +++++-
 .../libstatictest/CMakeLists.txt                   |    4 +++-
 4 files changed, 17 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list