From a1f46ed87550b6baab7a20c7f50de25d57588946 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 8 Nov 2024 10:11:59 -0600 Subject: [PATCH 1/3] CXX-3171 Remove obsolete export macros --- Doxyfile | 14 +----- etc/coding_guidelines.md | 2 +- src/bsoncxx/CMakeLists.txt | 6 --- .../bsoncxx/builder/basic/sub_array.hpp | 2 - .../bsoncxx/builder/basic/sub_document.hpp | 2 - .../v_noabi/bsoncxx/config/compiler.hpp | 6 --- .../v_noabi/bsoncxx/config/postlude.hpp | 10 ----- .../v_noabi/bsoncxx/config/prelude.hpp | 12 ----- .../include/bsoncxx/v_noabi/bsoncxx/fwd.hpp | 44 ------------------- src/bsoncxx/test/CMakeLists.txt | 8 ---- src/mongocxx/CMakeLists.txt | 6 --- .../v_noabi/mongocxx/config/compiler.hpp | 6 --- .../v_noabi/mongocxx/config/postlude.hpp | 4 -- .../v_noabi/mongocxx/config/prelude.hpp | 8 ---- .../include/mongocxx/v_noabi/mongocxx/fwd.hpp | 44 ------------------- src/mongocxx/test/CMakeLists.txt | 4 -- 16 files changed, 2 insertions(+), 176 deletions(-) diff --git a/Doxyfile b/Doxyfile index 6c1790f1b2..bf45967098 100644 --- a/Doxyfile +++ b/Doxyfile @@ -2434,23 +2434,11 @@ PREDEFINED = BSONCXX_ABI_EXPORT_CDECL(...)=__VA_ARGS__ \ EXPAND_AS_DEFINED = BSONCXX_ABI_CDECL \ BSONCXX_ABI_EXPORT \ BSONCXX_ABI_NO_EXPORT \ - BSONCXX_API \ - BSONCXX_CALL \ BSONCXX_DEPRECATED \ - BSONCXX_DEPRECATED_EXPORT \ - BSONCXX_DEPRECATED_NO_EXPORT \ - BSONCXX_INLINE \ - BSONCXX_PRIVATE \ MONGOCXX_ABI_CDECL \ MONGOCXX_ABI_EXPORT \ MONGOCXX_ABI_NO_EXPORT \ - MONGOCXX_API \ - MONGOCXX_CALL \ - MONGOCXX_DEPRECATED \ - MONGOCXX_DEPRECATED_EXPORT \ - MONGOCXX_DEPRECATED_NO_EXPORT \ - MONGOCXX_INLINE \ - MONGOCXX_PRIVATE + MONGOCXX_DEPRECATED # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have diff --git a/etc/coding_guidelines.md b/etc/coding_guidelines.md index 938345deeb..5c5616f703 100644 --- a/etc/coding_guidelines.md +++ b/etc/coding_guidelines.md @@ -130,7 +130,7 @@ class foo { private: friend baz; - class MONGOCXX_PRIVATE impl; + class impl; std::unique_ptr _impl; }; diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt index d7ec5c316d..f370f1cf46 100644 --- a/src/bsoncxx/CMakeLists.txt +++ b/src/bsoncxx/CMakeLists.txt @@ -164,12 +164,6 @@ if(1) "#endif\n" "\n" "#define BSONCXX_ABI_EXPORT_CDECL(...) BSONCXX_ABI_EXPORT __VA_ARGS__ BSONCXX_ABI_CDECL\n" - "\n" - "// For backward compatibility. Use BSONCXX_ABI_EXPORT_CDECL instead.\n" - "#define BSONCXX_API BSONCXX_ABI_EXPORT\n" - "\n" - "// For backward compatibility. Use BSONCXX_ABI_NO_EXPORT instead.\n" - "#define BSONCXX_PRIVATE BSONCXX_ABI_NO_EXPORT\n" ) generate_export_header(${TARGET} BASE_NAME BSONCXX_ABI diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_array.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_array.hpp index 91417bf6e3..5b25afd4ea 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_array.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_array.hpp @@ -57,7 +57,6 @@ class sub_array { /// /// Inductive base-case for the variadic append(...) /// - BSONCXX_INLINE void append() {} private: @@ -72,7 +71,6 @@ class sub_array { // // Concatenates another bson array directly. // - BSONCXX_INLINE void append_(concatenate_array array) { _core->concatenate(array.view()); } diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_document.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_document.hpp index a1b0798698..77ea905fec 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_document.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_document.hpp @@ -56,7 +56,6 @@ class sub_document { /// /// Inductive base-case for the variadic append(...) /// - BSONCXX_INLINE void append() {} private: @@ -92,7 +91,6 @@ class sub_document { // // Concatenates another bson document directly. // - BSONCXX_INLINE void append_(concatenate_doc doc) { _core->concatenate(doc); } diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp index 18502e00c1..2634d3ab41 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp @@ -36,12 +36,6 @@ // clang-format on -// For backward compatibility. Use `inline` instead. -#define BSONCXX_INLINE inline BSONCXX_ABI_NO_EXPORT - -// For backward compatibility. Use BSONCXX_ABI_EXPORT_CDECL instead. -#define BSONCXX_CALL BSONCXX_ABI_CDECL - /// /// @file /// Provides macros for internal use. diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp index 368c470d85..843cb2563d 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp @@ -12,12 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// compiler.hpp -#undef BSONCXX_INLINE -#pragma pop_macro("BSONCXX_INLINE") -#undef BSONCXX_CALL -#pragma pop_macro("BSONCXX_CALL") - // config.hpp (generated by CMake) #undef BSONCXX_POLY_USE_MNMLSTC #pragma pop_macro("BSONCXX_POLY_USE_MNMLSTC") @@ -46,11 +40,7 @@ #pragma pop_macro("BSONCXX_ABI_NO_EXPORT") #pragma pop_macro("BSONCXX_ABI_CDECL") #pragma pop_macro("BSONCXX_ABI_EXPORT_CDECL") -#pragma pop_macro("BSONCXX_API") -#pragma pop_macro("BSONCXX_PRIVATE") #pragma pop_macro("BSONCXX_DEPRECATED") -#pragma pop_macro("BSONCXX_DEPRECATED_EXPORT") -#pragma pop_macro("BSONCXX_DEPRECATED_NO_EXPORT") // prelude.hpp #undef BSONCXX_UNREACHABLE diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp index 0b64ad1027..be9b326bab 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp @@ -49,10 +49,6 @@ #undef BSONCXX_FWD // compiler.hpp -#pragma push_macro("BSONCXX_INLINE") -#undef BSONCXX_INLINE -#pragma push_macro("BSONCXX_CALL") -#undef BSONCXX_CALL #pragma push_macro("BSONCXX_IF_MSVC") #undef BSONCXX_IF_MSVC #pragma push_macro("BSONCXX_IF_GCC") @@ -95,16 +91,8 @@ #undef BSONCXX_ABI_CDECL #pragma push_macro("BSONCXX_ABI_EXPORT_CDECL") #undef BSONCXX_ABI_EXPORT_CDECL -#pragma push_macro("BSONCXX_API") -#undef BSONCXX_API -#pragma push_macro("BSONCXX_PRIVATE") -#undef BSONCXX_PRIVATE #pragma push_macro("BSONCXX_DEPRECATED") #undef BSONCXX_DEPRECATED -#pragma push_macro("BSONCXX_DEPRECATED_EXPORT") -#undef BSONCXX_DEPRECATED -#pragma push_macro("BSONCXX_DEPRECATED_NO_EXPORT") -#undef BSONCXX_DEPRECATED #include // diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp index 4516a37ef2..e16b3d6033 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp @@ -206,34 +206,6 @@ /// #define BSONCXX_ABI_EXPORT_CDECL(...) BSONCXX_ABI_EXPORT __VA_ARGS__ BSONCXX_ABI_CDECL -/// -/// @ingroup bsoncxx-v_noabi-bsoncxx-config-export-hpp -/// Equivalent to @ref BSONCXX_ABI_EXPORT. -/// -/// @warning For internal use only! -/// -/// @note This is a symbol visibility control macro, NOT a declaration of public API. Public API vs. -/// private API is determined by the placement of the entity being declared (e.g. in a public -/// header, as a public class member, etc.) or by documentation (e.g. absence of "For internal use -/// only!" warnings). See [API and ABI -/// Versioning](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/api-abi-versioning/). -/// -#define BSONCXX_API BSONCXX_ABI_EXPORT - -/// -/// @ingroup bsoncxx-v_noabi-bsoncxx-config-export-hpp -/// Equivalent to `inline` with @ref BSONCXX_ABI_NO_EXPORT. -/// -/// @warning For internal use only! -/// -/// @note This is a symbol visibility control macro, NOT a declaration of private API. Public API -/// vs. private API is determined by the placement of the entity being declared (e.g. in a detail -/// header, as a private class member, etc.) or by documentation (e.g. "For internal use only!", -/// absence of documentation, etc.). See [API and ABI -/// Versioning](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/api-abi-versioning/). -/// -#define BSONCXX_PRIVATE inline BSONCXX_ABI_NO_EXPORT - /// /// @ingroup bsoncxx-v_noabi-bsoncxx-config-export-hpp /// Declares the associated entity as deprecated. @@ -242,22 +214,6 @@ /// #define BSONCXX_DEPRECATED -/// -/// @ingroup bsoncxx-v_noabi-bsoncxx-config-export-hpp -/// Equivalent to @ref BSONCXX_API and @ref BSONCXX_DEPRECATED. -/// -/// @warning For internal use only! -/// -#define BSONCXX_DEPRECATED_EXPORT - -/// -/// @ingroup bsoncxx-v_noabi-bsoncxx-config-export-hpp -/// Equivalent to @ref BSONCXX_PRIVATE and @ref BSONCXX_DEPRECATED. -/// -/// @warning For internal use only! -/// -#define BSONCXX_DEPRECATED_NO_EXPORT - /// /// @} /// diff --git a/src/bsoncxx/test/CMakeLists.txt b/src/bsoncxx/test/CMakeLists.txt index 5003db1bbd..f738ad6ed6 100644 --- a/src/bsoncxx/test/CMakeLists.txt +++ b/src/bsoncxx/test/CMakeLists.txt @@ -85,10 +85,6 @@ if(ENABLE_MACRO_GUARD_TESTS) PROJECT_NAME bsoncxx PROJECT_TEST_PROPERTIES_TARGET bsoncxx::test_properties GUARDED_MACROS - # compiler.hpp - BSONCXX_INLINE - BSONCXX_CALL - # config.hpp (generated by CMake) BSONCXX_POLY_USE_MNMLSTC BSONCXX_POLY_USE_SYSTEM_MNMLSTC @@ -109,11 +105,7 @@ if(ENABLE_MACRO_GUARD_TESTS) BSONCXX_ABI_NO_EXPORT BSONCXX_ABI_EXPORT_CDECL BSONCXX_ABI_EXPORT_CDECL_TESTING - BSONCXX_API - BSONCXX_PRIVATE BSONCXX_DEPRECATED - BSONCXX_DEPRECATED_EXPORT - BSONCXX_DEPRECATED_NO_EXPORT # prelude.hpp BSONCXX_UNREACHABLE diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt index b0af93c04b..f70d29c1a6 100644 --- a/src/mongocxx/CMakeLists.txt +++ b/src/mongocxx/CMakeLists.txt @@ -112,12 +112,6 @@ if(1) "\n" "#define MONGOCXX_ABI_EXPORT_CDECL(...) MONGOCXX_ABI_EXPORT __VA_ARGS__ MONGOCXX_ABI_CDECL\n" "\n" - "// For backward compatibility. Use MONGOCXX_ABI_EXPORT_CDECL instead.\n" - "#define MONGOCXX_API MONGOCXX_ABI_EXPORT\n" - "\n" - "// For backward compatibility. Use MONGOCXX_ABI_NO_EXPORT instead.\n" - "#define MONGOCXX_PRIVATE MONGOCXX_ABI_NO_EXPORT\n" - "\n" "// Declare the entity as deprecated.\n" "#define MONGOCXX_DEPRECATED MONGOCXX_ABI_DEPRECATED\n" ) diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/compiler.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/compiler.hpp index 63651b0c89..133082ea9f 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/compiler.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/compiler.hpp @@ -12,12 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// For backward compatibility. Use `inline` instead. -#define MONGOCXX_INLINE inline MONGOCXX_ABI_NO_EXPORT - -// For backward compatibility. Use MONGOCXX_ABI_EXPORT_CDECL instead. -#define MONGOCXX_CALL MONGOCXX_ABI_CDECL - /// /// @file /// Provides macros for internal use. diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp index 62348f9110..554b71e653 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp @@ -37,11 +37,7 @@ #pragma pop_macro("MONGOCXX_ABI_NO_EXPORT") #pragma pop_macro("MONGOCXX_ABI_CDECL") #pragma pop_macro("MONGOCXX_ABI_EXPORT_CDECL") -#pragma pop_macro("MONGOCXX_API") -#pragma pop_macro("MONGOCXX_PRIVATE") #pragma pop_macro("MONGOCXX_DEPRECATED") -#pragma pop_macro("MONGOCXX_DEPRECATED_EXPORT") -#pragma pop_macro("MONGOCXX_DEPRECATED_NO_EXPORT") #endif // prelude.hpp diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp index 481d50926e..fcf836307b 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp @@ -41,16 +41,8 @@ #undef MONGOCXX_ABI_CDECL #pragma push_macro("MONGOCXX_ABI_EXPORT_CDECL") #undef MONGOCXX_ABI_EXPORT_CDECL -#pragma push_macro("MONGOCXX_API") -#undef MONGOCXX_API -#pragma push_macro("MONGOCXX_PRIVATE") -#undef MONGOCXX_PRIVATE #pragma push_macro("MONGOCXX_DEPRECATED") #undef MONGOCXX_DEPRECATED -#pragma push_macro("MONGOCXX_DEPRECATED_EXPORT") -#undef MONGOCXX_DEPRECATED_EXPORT -#pragma push_macro("MONGOCXX_DEPRECATED_NO_EXPORT") -#undef MONGOCXX_DEPRECATED_NO_EXPORT #endif #include diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp index a963783090..885c290162 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp @@ -203,34 +203,6 @@ /// #define MONGOCXX_ABI_EXPORT_CDECL(...) MONGOCXX_ABI_EXPORT __VA_ARGS__ MONGOCXX_ABI_CDECL -/// -/// @ingroup mongocxx-v_noabi-mongocxx-config-export-hpp -/// Equivalent to @ref MONGOCXX_ABI_EXPORT. -/// -/// @warning For internal use only! -/// -/// @note This is a symbol visibility control macro, NOT a declaration of public API. Public API vs. -/// private API is determined by the placement of the entity being declared (e.g. in a public -/// header, as a public class member, etc.) or by documentation (e.g. absence of "For internal use -/// only!" warnings). See [API and ABI -/// Versioning](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/api-abi-versioning/). -/// -#define MONGOCXX_API MONGOCXX_ABI_EXPORT - -/// -/// @ingroup mongocxx-v_noabi-mongocxx-config-export-hpp -/// Equivalent to `inline` with @ref MONGOCXX_ABI_NO_EXPORT. -/// -/// @warning For internal use only! -/// -/// @note This is a symbol visibility control macro, NOT a declaration of private API. Public API -/// vs. private API is determined by the placement of the entity being declared (e.g. in a detail -/// header, as a private class member, etc.) or by documentation (e.g. "For internal use only!", -/// absence of documentation, etc.). See [API and ABI -/// Versioning](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/api-abi-versioning/). -/// -#define MONGOCXX_PRIVATE inline MONGOCXX_ABI_NO_EXPORT - /// /// @ingroup mongocxx-v_noabi-mongocxx-config-export-hpp /// Declares the associated entity as deprecated. @@ -239,22 +211,6 @@ /// #define MONGOCXX_DEPRECATED -/// -/// @ingroup mongocxx-v_noabi-mongocxx-config-export-hpp -/// Equivalent to @ref MONGOCXX_API and @ref MONGOCXX_DEPRECATED. -/// -/// @warning For internal use only! -/// -#define MONGOCXX_DEPRECATED_EXPORT - -/// -/// @ingroup mongocxx-v_noabi-mongocxx-config-export-hpp -/// Equivalent to @ref MONGOCXX_PRIVATE and @ref MONGOCXX_DEPRECATED. -/// -/// @warning For internal use only! -/// -#define MONGOCXX_DEPRECATED_NO_EXPORT - /// /// @} /// diff --git a/src/mongocxx/test/CMakeLists.txt b/src/mongocxx/test/CMakeLists.txt index 9951227186..f0748d1786 100644 --- a/src/mongocxx/test/CMakeLists.txt +++ b/src/mongocxx/test/CMakeLists.txt @@ -310,11 +310,7 @@ if(ENABLE_MACRO_GUARD_TESTS) MONGOCXX_ABI_EXPORT_CDECL MONGOCXX_ABI_EXPORT_CDECL_TESTING MONGOCXX_ABI_NO_EXPORT - MONGOCXX_API - MONGOCXX_PRIVATE MONGOCXX_DEPRECATED - MONGOCXX_DEPRECATED_EXPORT - MONGOCXX_DEPRECATED_NO_EXPORT # prelude.hpp MONGOCXX_UNREACHABLE From 9be17e18750b15607aff7ec0abe01cd7adbbbdf3 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 8 Nov 2024 10:48:58 -0600 Subject: [PATCH 2/3] Prevent defining deprecation+export macros in export header --- src/bsoncxx/CMakeLists.txt | 3 +++ src/mongocxx/CMakeLists.txt | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt index f370f1cf46..903008aae1 100644 --- a/src/bsoncxx/CMakeLists.txt +++ b/src/bsoncxx/CMakeLists.txt @@ -156,6 +156,9 @@ if(1) function(bsoncxx_install_export_header TARGET) set(bsoncxx_export_header_custom_content "") string(APPEND bsoncxx_export_header_custom_content + "\n" + "#undef BSONCXX_DEPRECATED_EXPORT\n" + "#undef BSONCXX_DEPRECATED_NO_EXPORT\n" "\n" "#if defined(_MSC_VER)\n" "#define BSONCXX_ABI_CDECL __cdecl\n" diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt index f70d29c1a6..8340c28931 100644 --- a/src/mongocxx/CMakeLists.txt +++ b/src/mongocxx/CMakeLists.txt @@ -103,6 +103,9 @@ if(1) function(mongocxx_install_export_header TARGET) set(mongocxx_export_header_custom_content "") string(APPEND mongocxx_export_header_custom_content + "\n" + "#undef MONGOCXX_DEPRECATED_EXPORT\n" + "#undef MONGOCXX_DEPRECATED_NO_EXPORT\n" "\n" "#if defined(_MSC_VER)\n" "#define MONGOCXX_ABI_CDECL __cdecl\n" @@ -111,14 +114,11 @@ if(1) "#endif\n" "\n" "#define MONGOCXX_ABI_EXPORT_CDECL(...) MONGOCXX_ABI_EXPORT __VA_ARGS__ MONGOCXX_ABI_CDECL\n" - "\n" - "// Declare the entity as deprecated.\n" - "#define MONGOCXX_DEPRECATED MONGOCXX_ABI_DEPRECATED\n" ) generate_export_header(${TARGET} BASE_NAME MONGOCXX_ABI EXPORT_MACRO_NAME MONGOCXX_ABI_EXPORT - DEPRECATED_MACRO_NAME MONGOCXX_ABI_DEPRECATED + DEPRECATED_MACRO_NAME MONGOCXX_DEPRECATED EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/mongocxx/v_noabi/mongocxx/config/export.hpp STATIC_DEFINE MONGOCXX_STATIC CUSTOM_CONTENT_FROM_VARIABLE mongocxx_export_header_custom_content From 7d9b1c854b1794109d92ef3871c2605d813c096f Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Fri, 8 Nov 2024 12:58:43 -0600 Subject: [PATCH 3/3] Remove references to obsolete mongocxx export macros --- .../include/mongocxx/v_noabi/mongocxx/config/postlude.hpp | 6 ------ .../include/mongocxx/v_noabi/mongocxx/config/prelude.hpp | 6 ------ src/mongocxx/test/CMakeLists.txt | 4 ---- 3 files changed, 16 deletions(-) diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp index 554b71e653..987725c85e 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/postlude.hpp @@ -12,12 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// compiler.hpp -#undef MONGOCXX_INLINE -#pragma pop_macro("MONGOCXX_INLINE") -#undef MONGOCXX_CALL -#pragma pop_macro("MONGOCXX_CALL") - // version.hpp (generated by CMake) #undef MONGOCXX_VERSION_STRING #pragma pop_macro("MONGOCXX_VERSION_STRING") diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp index fcf836307b..f7aa806423 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp @@ -12,12 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// compiler.hpp -#pragma push_macro("MONGOCXX_INLINE") -#undef MONGOCXX_INLINE -#pragma push_macro("MONGOCXX_CALL") -#undef MONGOCXX_CALL - // version.hpp (generated by CMake) #pragma push_macro("MONGOCXX_VERSION_STRING") #undef MONGOCXX_VERSION_STRING diff --git a/src/mongocxx/test/CMakeLists.txt b/src/mongocxx/test/CMakeLists.txt index f0748d1786..33b369af60 100644 --- a/src/mongocxx/test/CMakeLists.txt +++ b/src/mongocxx/test/CMakeLists.txt @@ -292,10 +292,6 @@ if(ENABLE_MACRO_GUARD_TESTS) PROJECT_NAME mongocxx PROJECT_TEST_PROPERTIES_TARGET mongocxx::test_properties GUARDED_MACROS - # compiler.hpp - MONGOCXX_INLINE - MONGOCXX_CALL - # version.hpp (generated by CMake) MONGOCXX_VERSION_STRING MONGOCXX_VERSION_EXTRA