diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-08-23 23:26:43 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-08-23 23:26:43 +0200 |
commit | e0cc024dc90c74ff504995ce9ccd3671f9bf3db2 (patch) | |
tree | 6f35c2229007fb1f19941e2d2aeaa8ab50c0e64c /Modules/GenerateExportHeader.cmake | |
parent | 1b031d1a3f236f7c2c301e042bdc22bdfc4064c0 (diff) | |
download | cmake-e0cc024dc90c74ff504995ce9ccd3671f9bf3db2.tar.gz |
Add missing NO_EXPORT macro variant.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r-- | Modules/GenerateExportHeader.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 0fe69a8bdb..e02811a287 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -221,8 +221,8 @@ endmacro() macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) # Option overrides - set(options) - set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE) + set(options DEFINE_NO_DEPRECATED) + set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE NO_DEPRECATED_MACRO_NAME) set(multiValueArgs) cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -242,6 +242,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME_LOWER}_export.h") set(DEPRECATED_MACRO_NAME "${PREFIX}${BASE_NAME_UPPER}_DEPRECATED") set(STATIC_DEFINE "${PREFIX}${BASE_NAME_UPPER}_STATIC_DEFINE") + set(NO_DEPRECATED_MACRO_NAME "${BASE_NAME_UPPER}_NO_DEPRECATED") if(_GEH_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unknown keywords given to GENERATE_EXPORT_HEADER(): \"${_GEH_UNPARSED_ARGUMENTS}\"") @@ -267,6 +268,14 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) set(STATIC_DEFINE ${PREFIX}${_GEH_STATIC_DEFINE}) endif() + if (_GEH_DEFINE_NO_DEPRECATED) + set(DEFINE_NO_DEPRECATED TRUE) + endif() + + if (_GEH_NO_DEPRECATED_MACRO_NAME) + set(NO_DEPRECATED_MACRO_NAME ${PREFIX}${_GEH_NO_DEPRECATED_MACRO_NAME}) + endif() + set(INCLUDE_GUARD_NAME "${PREFIX}${EXPORT_MACRO_NAME}_H") get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL) |