Skip to content
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

CXX-3067 test for existing examples target before add_custom_target #1172

Closed
wants to merge 1 commit into from

Conversation

eramongodb
Copy link
Collaborator

Resolves CXX-3067. Companion to mongodb/mongo-c-driver#1675.

Avoid the C Driver imported via add_subdirectory(), which defines the examples target, from conflicting with CXX Driver's attempt to create an examples target. Otherwise the following error may be observed:

CMake Error at examples/CMakeLists.txt:33 (add_custom_target):
  add_custom_target cannot create target "examples" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory
  "_deps/mongo-c-driver-src/src/libbson".
  See documentation for policy CMP0002 for more details.

If a tests target is ever added to the CXX Driver, it will need the existence check as well.

@eramongodb eramongodb requested a review from kevinAlbs July 19, 2024 17:36
@eramongodb eramongodb self-assigned this Jul 19, 2024
@eramongodb
Copy link
Collaborator Author

No longer necessary due to prefixed target names by C Driver: mongodb/mongo-c-driver#1675 (comment)

@eramongodb eramongodb closed this Jul 19, 2024
@eramongodb eramongodb deleted the cxx-3067 branch July 26, 2024 18:56
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