diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-08-10 19:43:16 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-08-10 19:43:16 (GMT) |
commit | fc3772edc9efc924f9d76c630719914c556e1d4e (patch) | |
tree | 04a2db1114d0cf73f4ea46163463c240cbb5db60 /Modules/GenerateExportHeader.cmake | |
parent | bab4a22036a988f49e1b711d092416c18cc16870 (diff) | |
download | CMake-fc3772edc9efc924f9d76c630719914c556e1d4e.zip CMake-fc3772edc9efc924f9d76c630719914c556e1d4e.tar.gz CMake-fc3772edc9efc924f9d76c630719914c556e1d4e.tar.bz2 |
Another attempt to fix the tests on Borland.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r-- | Modules/GenerateExportHeader.cmake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 1395f15..1578365 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -148,8 +148,10 @@ macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY) set(DEFINE_IMPORT) set(DEFINE_NO_EXPORT) - if(WIN32 AND NOT (${CMAKE_CXX_COMPILER_ID} MATCHES Borland)) - set(DEFINE_DEPRECATED "__declspec(deprecated)") + if(WIN32) + if (${CMAKE_CXX_COMPILER_ID} MATCHES Borland) + set(DEFINE_DEPRECATED "__declspec(deprecated)") + endif() else() set(DEFINE_DEPRECATED "__attribute__ ((__deprecated__))") endif() @@ -157,9 +159,11 @@ macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY) get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE) if(NOT ${type} STREQUAL "STATIC_LIBRARY") - if(WIN32 AND NOT (${CMAKE_CXX_COMPILER_ID} MATCHES Borland)) - set(DEFINE_EXPORT "__declspec(dllexport)") - set(DEFINE_IMPORT "__declspec(dllimport)") + if(WIN32) + if (NOT (${CMAKE_CXX_COMPILER_ID} MATCHES Borland)) + set(DEFINE_EXPORT "__declspec(dllexport)") + set(DEFINE_IMPORT "__declspec(dllimport)") + endif() elseif(COMPILER_HAS_HIDDEN_VISIBILITY AND USE_COMPILER_HIDDEN_VISIBILITY) set(DEFINE_EXPORT "__attribute__((visibility(\"default\")))") set(DEFINE_IMPORT "__attribute__((visibility(\"default\")))") |