summaryrefslogtreecommitdiff
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake13
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)