Add documentation about the prefix and no_deprecated options.

This commit is contained in:
Stephen Kelly 2011-08-25 18:56:02 +02:00
parent 51bc63a7cb
commit 8b9b8e1676
1 changed files with 42 additions and 0 deletions

View File

@ -15,6 +15,9 @@
# [DEPRECATED_MACRO_NAME <deprecated_macro_name>] # [DEPRECATED_MACRO_NAME <deprecated_macro_name>]
# [NO_EXPORT_MACRO_NAME <no_export_macro_name>] # [NO_EXPORT_MACRO_NAME <no_export_macro_name>]
# [STATIC_DEFINE <static_define>] # [STATIC_DEFINE <static_define>]
# [NO_DEPRECATED_MACRO_NAME <no_deprecated_macro_name>]
# [DEFINE_NO_DEPRECATED]
# [PREFIX_NAME <prefix_name>]
# ) # )
# #
# ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] ) # ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] )
@ -97,6 +100,45 @@
# set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE) # set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE)
# #
# This will cause the export macros to expand to nothing when building the static library. # This will cause the export macros to expand to nothing when building the static library.
#
# If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED will be defined
# This macro can be used to remove deprecated code from preprocessor output.
#
# option(EXCLUDE_DEPRECATED "Exclude deprecated parts of the library" FALSE)
#
# if (EXCLUDE_DEPRECATED)
# set(NO_BUILD_DEPRECATED DEFINE_NO_DEPRECATED)
# endif()
#
# generate_export_header(somelib ${NO_BUILD_DEPRECATED})
#
# And then in somelib:
#
# \code
# class SOMELIB_EXPORT SomeClass
# {
# public:
# #ifndef SOMELIB_NO_DEPRECATED
# SOMELIB_DEPRECATED void oldMethod();
# #endif
# };
#
# // ...
#
# #ifndef SOMELIB_NO_DEPRECATED
# void SomeClass::oldMethod() { }
# #endif
#
# \endcode
#
# If PREFIX_NAME is specified, the argument will be used as a prefix to all
# generated macros.
#
# For example:
#
# generate_export_header(somelib PREFIX_NAME VTK_)
#
# Generates the macros VTK_SOMELIB_EXPORT etc.
#============================================================================= #=============================================================================