Skip to content

Feature/optional tests - #90

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

Feature/optional tests#90
nsoblath wants to merge 2 commits into
bloomberg:mainfrom
driplineorg:feature/optional-tests

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.

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

… built

Signed-off-by: Noah Oblath <nsoblath@gmail.com>
…fault is still on. Tie vcpkg manifest setting to the CMake setting.

Signed-off-by: Noah Oblath <nsoblath@gmail.com>
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