From 20748d42a2f1241ee0be5807bfb70721c0bf5be0 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 4 May 2022 14:30:44 -0700 Subject: [PATCH] Always use GZ_ prefixed export base Signed-off-by: methylDragon --- cmake/Export.hh.in | 18 +++++++----------- cmake/IgnUtils.cmake | 17 +---------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/cmake/Export.hh.in b/cmake/Export.hh.in index f07c0f26..003f6193 100644 --- a/cmake/Export.hh.in +++ b/cmake/Export.hh.in @@ -52,12 +52,6 @@ #endif -#ifndef IGN_DEPRECATED -// TODO(CH3): Remove on ticktock -// NOTE(CH3): This has no docstring since we'll make GZ_DEPRECATED the default -#define IGN_DEPRECATED(version) GZ_DEPRECATED_ALL_VERSIONS -#endif - #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 @@ -73,10 +67,6 @@ // TICKTOCK IGNITION ======================================================== // TODO(CH3): Remove on ticktock, supports defining IGNITION macros if we're // a lib is using GZ_ prefixed export macros -#define _@export_base@_USING_GZ_EXPORT_BASE @_using_gz_export_base@ -#if _USING_GZ_EXPORT_BASE - - #ifndef @_ign_export_base@_VISIBLE /// For @lib_name@ developers: Apply this macro to @lib_name@ /// functions and classes which consumers of this library will need to be able @@ -97,5 +87,11 @@ #endif -#endif // _@export_base@_USING_GZ_EXPORT_BASE +#ifndef IGN_DEPRECATED +// TODO(CH3): Remove on ticktock +// NOTE(CH3): This has no docstring since we'll make GZ_DEPRECATED the default +#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 11b723e5..5a18c166 100644 --- a/cmake/IgnUtils.cmake +++ b/cmake/IgnUtils.cmake @@ -1182,18 +1182,10 @@ function(ign_add_component component_name) #------------------------------------ # Create the target for this component, and configure it to be installed - - # Support "gz-" - if(${PROJECT_LIBRARY_TARGET_NAME} MATCHES "^gz-") - set(EXPORT_PREFIX "GZ") - else() - set(EXPORT_PREFIX "IGNITION") - endif() - _ign_add_library_or_component( LIB_NAME ${component_target_name} INCLUDE_DIR "${PROJECT_INCLUDE_DIR}/${include_subdir}" - EXPORT_BASE ${EXPORT_PREFIX}_${IGN_DESIGNATION_UPPER}_${component_name_upper} + EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER}_${component_name_upper} SOURCES ${sources} ${interface_option}) @@ -1394,7 +1386,6 @@ macro(_ign_add_library_or_component) # - export_base # - lib_name # - # - _using_gz_export_base # - _ign_export_base #------------------------------------ @@ -1499,12 +1490,6 @@ macro(_ign_add_library_or_component) # 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! - if(${export_base} MATCHES "^GZ_") - set(_using_gz_export_base 1) - else() - set(_using_gz_export_base 0) - endif() - string(REGEX REPLACE "^GZ_" "IGNITION_" _ign_export_base ${export_base}) configure_file(