diff --git a/cmake/Export.hh.in b/cmake/Export.hh.in index c20b4836..a45444aa 100644 --- a/cmake/Export.hh.in +++ b/cmake/Export.hh.in @@ -52,12 +52,33 @@ #endif -#ifndef IGN_DEPRECATED +#ifndef GZ_DEPRECATED /// For @lib_name@ developers: Use this macro to indicate that a /// function or class has been deprecated and should no longer be used. A /// version should be specified to provide context to the user about when the /// function became deprecated. -#define IGN_DEPRECATED(version) IGN_DEPRECATED_ALL_VERSIONS +#define GZ_DEPRECATED(version) GZ_DEPRECATED_ALL_VERSIONS +#endif + + +// TICKTOCK IGNITION ======================================================== +// TODO(CH3): Remove on ticktock, supports defining IGNITION macros if a lib +// is using GZ_ prefixed export macros +#ifndef @_ign_export_base@_VISIBLE +#define @_ign_export_base@_VISIBLE @export_base@_VISIBLE +#endif + +#ifndef @_ign_export_base@_HIDDEN +#define @_ign_export_base@_HIDDEN @export_base@_HIDDEN #endif +#ifndef IGN_DEPRECATED_ALL_VERSIONS +#define IGN_DEPRECATED_ALL_VERSIONS GZ_DEPRECATED_ALL_VERSIONS #endif + +#ifndef IGN_DEPRECATED +#define IGN_DEPRECATED(version) GZ_DEPRECATED_ALL_VERSIONS +#endif + + +#endif // @export_base@_EXPORT_HH_ diff --git a/cmake/IgnUtils.cmake b/cmake/IgnUtils.cmake index 04ef252b..59834fda 100644 --- a/cmake/IgnUtils.cmake +++ b/cmake/IgnUtils.cmake @@ -971,7 +971,7 @@ function(ign_create_core_library) _gz_add_library_or_component( LIB_NAME ${PROJECT_LIBRARY_TARGET_NAME} INCLUDE_DIR "${PROJECT_INCLUDE_DIR}" - EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER} + EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER} SOURCES ${sources} ${interface_option}) @@ -1155,7 +1155,7 @@ function(ign_add_component component_name) _gz_add_library_or_component( LIB_NAME ${component_target_name} INCLUDE_DIR "${PROJECT_INCLUDE_DIR}/${include_subdir}" - EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER}_${component_name_upper} + EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER}_${component_name_upper} SOURCES ${sources} ${interface_option}) @@ -1357,6 +1357,8 @@ macro(_gz_add_library_or_component) # - include_dir # - export_base # - lib_name + # + # - _ign_export_base #------------------------------------ # Define the expected arguments @@ -1442,7 +1444,7 @@ macro(_gz_add_library_or_component) EXPORT_FILE_NAME ${implementation_file_name} EXPORT_MACRO_NAME DETAIL_${export_base}_VISIBLE NO_EXPORT_MACRO_NAME DETAIL_${export_base}_HIDDEN - DEPRECATED_MACRO_NAME IGN_DEPRECATED_ALL_VERSIONS) + DEPRECATED_MACRO_NAME GZ_DEPRECATED_ALL_VERSIONS) set(install_include_dir "${IGN_INCLUDE_INSTALL_DIR_FULL}/${include_dir}") @@ -1456,6 +1458,12 @@ macro(_gz_add_library_or_component) # Configure the public-facing header for exporting and deprecating. This # header provides commentary for the macros so that developers can know their # purpose. + + # TODO(CH3): Remove this on ticktock + # This is to allow IGNITION_ prefixed export macros to generate in Export.hh + # _using_gz_export_base is used in Export.hh.in's configuration! + string(REGEX REPLACE "^GZ_" "IGNITION_" _ign_export_base ${export_base}) + configure_file( "${IGNITION_CMAKE_DIR}/Export.hh.in" "${binary_include_dir}/Export.hh")