Skip to content

CXX-2750 Remove references to BSONCXX_ABI_VERSION and MONGOCXX_ABI_VERSION #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/BsoncxxUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function(bsoncxx_add_library TARGET OUTPUT_NAME LINK_TYPE)
set_target_properties(${TARGET} PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
SOVERSION ${BSONCXX_ABI_VERSION}
SOVERSION _noabi
)
endif()

Expand Down Expand Up @@ -69,7 +69,7 @@ function(bsoncxx_install BSONCXX_TARGET_LIST BSONCXX_PKG_DEP BSONCXX_BOOST_PKG_D
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dev
INCLUDES DESTINATION ${BSONCXX_HEADER_INSTALL_DIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi
)

write_basic_package_version_file(
Expand Down
4 changes: 2 additions & 2 deletions cmake/MongocxxUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function(mongocxx_add_library TARGET OUTPUT_NAME LINK_TYPE)
set_target_properties (${TARGET} PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
SOVERSION ${MONGOCXX_ABI_VERSION}
SOVERSION _noabi
)
endif()

Expand Down Expand Up @@ -57,7 +57,7 @@ function(mongocxx_install MONGOCXX_TARGET_LIST MONGOCXX_PKG_DEP)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dev
INCLUDES DESTINATION ${MONGOCXX_HEADER_INSTALL_DIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi
)

write_basic_package_version_file(
Expand Down
2 changes: 1 addition & 1 deletion examples/bsoncxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

include_directories(
${CMAKE_INSTALL_PREFIX}/${BSONCXX_HEADER_INSTALL_DIR}
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi
)

set(BSONCXX_EXAMPLES
Expand Down
4 changes: 2 additions & 2 deletions examples/mongocxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# limitations under the License.

include_directories(
${CMAKE_INSTALL_PREFIX}/${BSONCXX_HEADER_INSTALL_DIR}
${CMAKE_INSTALL_PREFIX}/${MONGOCXX_HEADER_INSTALL_DIR}
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi
)

set(MONGOCXX_EXAMPLES
Expand Down
2 changes: 1 addition & 1 deletion generate_uninstall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ else ()
\"\${MONGOCXX_INSTALL_MANIFEST_CONTENT}\")
execute_process (
COMMAND
find \"\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${BSONCXX_HEADER_INSTALL_DIR}\" \"\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${MONGOCXX_HEADER_INSTALL_DIR}\" -type d -empty -delete
find \"\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi\" \"\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi\" -type d -empty -delete
)
execute_process (
COMMAND
Expand Down
8 changes: 2 additions & 6 deletions src/bsoncxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
project(BSONCXX)

ParseVersion (${BUILD_VERSION} BSONCXX)
# TODO: read from file
set(BSONCXX_ABI_VERSION _noabi)

option(BSONCXX_POLY_USE_MNMLSTC "Use MNMLSTC/core for stdx polyfills" OFF)
option(BSONCXX_POLY_USE_STD_EXPERIMENTAL "Use std::experimental for stdx polyfills" OFF)
Expand Down Expand Up @@ -70,8 +68,6 @@ endif()
set(BSONCXX_VERSION_NO_EXTRA ${BSONCXX_VERSION_MAJOR}.${BSONCXX_VERSION_MINOR}.${BSONCXX_VERSION_PATCH})
set(BSONCXX_VERSION ${BSONCXX_VERSION_NO_EXTRA}${BSONCXX_VERSION_EXTRA})
message ("bsoncxx version: ${BSONCXX_VERSION}")
set(BSONCXX_INLINE_NAMESPACE "v${BSONCXX_ABI_VERSION}")
set(BSONCXX_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/${BSONCXX_INLINE_NAMESPACE}" CACHE INTERNAL "")

set(BSONCXX_POLY_MNMLSTC_DEPRECATED_INCLUDE_DIRS "")
set(BSONCXX_POLY_MNMLSTC_PKGCONFIG_INCLUDE_DIRS "")
Expand Down Expand Up @@ -231,12 +227,12 @@ install(DIRECTORY include/

install(FILES
${PROJECT_BINARY_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/export.hpp
DESTINATION ${BSONCXX_HEADER_INSTALL_DIR}/bsoncxx/config
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi/bsoncxx/config
COMPONENT dev
)

set(PACKAGE_INCLUDE_INSTALL_DIRS
${BSONCXX_HEADER_INSTALL_DIR}
${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi
${BSONCXX_POLY_MNMLSTC_DEPRECATED_INCLUDE_DIRS}
)
set(PACKAGE_LIBRARY_INSTALL_DIRS ${CMAKE_INSTALL_LIBDIR})
Expand Down
2 changes: 1 addition & 1 deletion src/bsoncxx/cmake/libbsoncxx-static.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Description: The MongoDB C++11 BSON Library
URL: http://github.com/mongodb/mongo-cxx-driver
Version: @BSONCXX_VERSION@
Requires: libbson-static-@LIBBSON_REQUIRED_ABI_VERSION@ >= @LIBBSON_REQUIRED_VERSION@
Cflags: @BSONCXX_POLY_MNMLSTC_PKGCONFIG_STATIC_INCLUDE_DIRS@-I${includedir}/bsoncxx/@BSONCXX_INLINE_NAMESPACE@ -DBSONCXX_STATIC
Cflags: @BSONCXX_POLY_MNMLSTC_PKGCONFIG_STATIC_INCLUDE_DIRS@-I${includedir}/bsoncxx/v_noabi -DBSONCXX_STATIC
Libs: -L${libdir} -lbsoncxx-static
2 changes: 1 addition & 1 deletion src/bsoncxx/cmake/libbsoncxx.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Name: libbsoncxx
Description: The MongoDB C++11 BSON Library
URL: http://github.com/mongodb/mongo-cxx-driver
Version: @BSONCXX_VERSION@
Cflags: @BSONCXX_POLY_MNMLSTC_PKGCONFIG_INCLUDE_DIRS@-I${includedir}/bsoncxx/@BSONCXX_INLINE_NAMESPACE@
Cflags: @BSONCXX_POLY_MNMLSTC_PKGCONFIG_INCLUDE_DIRS@-I${includedir}/bsoncxx/v_noabi
Libs: -L${libdir} -lbsoncxx
5 changes: 0 additions & 5 deletions src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
namespace bsoncxx {
BSONCXX_INLINE_NAMESPACE_BEGIN

// Placing this variable between the `BSONCXX_INLINE_NAMESPACE_BEGIN` and the Doxygen documentation
// for `to_json` suppressed the macro name from being shown as part of the return type in the
// generated documentation pages.
extern const bool k_silence_doxygen;

///
/// An enumeration of the types of Extended JSON that the to_json function accepts
enum class ExtendedJsonMode : std::uint8_t {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ configure_file(
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/config.hpp
${CMAKE_CURRENT_BINARY_DIR}/version.hpp
DESTINATION ${BSONCXX_HEADER_INSTALL_DIR}/bsoncxx/config
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi/bsoncxx/config
COMPONENT dev
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
#cmakedefine BSONCXX_POLY_USE_BOOST
#cmakedefine BSONCXX_POLY_USE_STD

#define BSONCXX_INLINE_NAMESPACE_BEGIN inline namespace @BSONCXX_INLINE_NAMESPACE@ {
#define BSONCXX_INLINE_NAMESPACE_BEGIN inline namespace v_noabi {

#define BSONCXX_INLINE_NAMESPACE_END } // namespace @BSONCXX_INLINE_NAMESPACE@
#define BSONCXX_INLINE_NAMESPACE_END } // namespace v_noabi
8 changes: 2 additions & 6 deletions src/mongocxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
project(MONGOCXX)

ParseVersion (${BUILD_VERSION} MONGOCXX)
# TODO: read from file
set(MONGOCXX_ABI_VERSION _noabi)

option(MONGOCXX_ENABLE_SSL "Enable SSL - if the underlying C driver offers it" ON)
option(MONGOCXX_ENABLE_SLOW_TESTS "Run slow tests when invoking the the test target" OFF)
Expand All @@ -26,8 +24,6 @@ set(MONGOCXX_OUTPUT_BASENAME "mongocxx" CACHE STRING "Output mongocxx library ba
set(MONGOCXX_VERSION_NO_EXTRA ${MONGOCXX_VERSION_MAJOR}.${MONGOCXX_VERSION_MINOR}.${MONGOCXX_VERSION_PATCH})
set(MONGOCXX_VERSION ${MONGOCXX_VERSION_NO_EXTRA}${MONGOCXX_VERSION_EXTRA})
message ("mongocxx version: ${MONGOCXX_VERSION}")
set(MONGOCXX_INLINE_NAMESPACE "v${MONGOCXX_ABI_VERSION}")
set(MONGOCXX_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/${MONGOCXX_INLINE_NAMESPACE}" CACHE INTERNAL "")

set(mongocxx_pkg_dep "")

Expand Down Expand Up @@ -215,11 +211,11 @@ install(DIRECTORY include/

install(FILES
${PROJECT_BINARY_DIR}/lib/mongocxx/v_noabi/mongocxx/config/export.hpp
DESTINATION ${MONGOCXX_HEADER_INSTALL_DIR}/mongocxx/config
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi/mongocxx/config
COMPONENT dev
)

set(PACKAGE_INCLUDE_INSTALL_DIRS ${MONGOCXX_HEADER_INSTALL_DIR})
set(PACKAGE_INCLUDE_INSTALL_DIRS ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi)
set(PACKAGE_LIBRARY_INSTALL_DIRS ${CMAKE_INSTALL_LIBDIR})
set(PACKAGE_LIBRARIES mongocxx)

Expand Down
2 changes: 1 addition & 1 deletion src/mongocxx/cmake/libmongocxx-static.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Description: The MongoDB C++11 Driver Library
URL: http://github.com/mongodb/mongo-cxx-driver
Version: @MONGOCXX_VERSION@
Requires: libbsoncxx-static >= @MONGOCXX_VERSION@, libmongoc-static-@LIBMONGOC_REQUIRED_ABI_VERSION@ >= @LIBMONGOC_REQUIRED_VERSION@
Cflags: -I${includedir}/mongocxx/@MONGOCXX_INLINE_NAMESPACE@ -DMONGOCXX_STATIC
Cflags: -I${includedir}/mongocxx/v_noabi -DMONGOCXX_STATIC
Libs: -L${libdir} -lmongocxx-static
2 changes: 1 addition & 1 deletion src/mongocxx/cmake/libmongocxx.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Description: The MongoDB C++11 Driver Library
URL: http://github.com/mongodb/mongo-cxx-driver
Version: @MONGOCXX_VERSION@
Requires: libbsoncxx >= @MONGOCXX_VERSION@
Cflags: -I${includedir}/mongocxx/@MONGOCXX_INLINE_NAMESPACE@
Cflags: -I${includedir}/mongocxx/v_noabi
Libs: -L${libdir} -lmongocxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ configure_file(
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/config.hpp
${CMAKE_CURRENT_BINARY_DIR}/version.hpp
DESTINATION ${MONGOCXX_HEADER_INSTALL_DIR}/mongocxx/config
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mongocxx/v_noabi/mongocxx/config
COMPONENT dev
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#define MONGOCXX_INLINE_NAMESPACE_BEGIN inline namespace @MONGOCXX_INLINE_NAMESPACE@ {
#define MONGOCXX_INLINE_NAMESPACE_BEGIN inline namespace v_noabi {

#define MONGOCXX_INLINE_NAMESPACE_END } // namespace @MONGOCXX_INLINE_NAMESPACE@
#define MONGOCXX_INLINE_NAMESPACE_END } // namespace v_noabi