Skip to content

Optional tests - #118

Open
nsoblath wants to merge 2 commits into
bloomberg:mainfrom
driplineorg:optional-tests-signed
Open

nsoblath wants to merge 2 commits into
bloomberg:mainfrom
driplineorg:optional-tests-signed

Conversation

@nsoblath

Copy link
Copy Markdown

Problem statement

This PR addresses the inability to build rmqcpp without the tests and the GTest dependency. This was requested in #69.

This is the same PR as #90, but with signed commits.

Proposed changes

I introduced a CMake option, rmqcpp_ENABLE_TESTING to control the building of tests and finding of GTest in CMake. From the vcpkg side I moved the gtest dependency to a feature that's enabled by default. To connect the vcpkg side to the CMake side, an additional CMake variable, rmqcpp_ENABLE_TESTING_DEFAULT, controls the default value of rmqcpp_ENABLE_TESTING.

If building directly with CMake, the option can be set with -Drmqcpp_ENABLE_TESTING when cmake is called. If building with vcpkg manifest mode, these are the different options that can be used:

cmake --preset <p>                                            # -> tests ON
cmake --preset <p> -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON    # -> tests OFF
cmake --preset <p> -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON \
                   -DVCPKG_MANIFEST_FEATURES=tests            # -> tests ON 

Testing is enabled by default for backwards compatibility.

Remaining work

  • Unit Tests
  • Integration Tests
  • Documentation

@nsoblath nsoblath mentioned this pull request Nov 23, 2026
3 tasks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant