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

Add alias target for doctest_with_main #617

Merged
merged 1 commit into from
Feb 17, 2022
Merged

Add alias target for doctest_with_main #617

merged 1 commit into from
Feb 17, 2022

Conversation

jessestricker
Copy link
Contributor

Description

This is just a small change:
I've added the alias doctest::doctest_with_main for the library target doctest_with_main.

Motivation

There already is the alias doctest::doctest for the library target doctest, so this change will increase consistency.
Indeed, I've recently tried the alias doctest::doctest_with_main in a personal project and was surprised it didn't exist.

@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #617 (628e689) into dev (f54a4e4) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #617   +/-   ##
=======================================
  Coverage   92.75%   92.75%           
=======================================
  Files           2        2           
  Lines        2071     2071           
=======================================
  Hits         1921     1921           
  Misses        150      150           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f54a4e4...628e689. Read the comment docs.

@Saalvage
Copy link
Member

Change looks good, I'm only wondering at the purpose of doctest::doctest although admittedly my experience with CMake is pretty limited!

@jessestricker
Copy link
Contributor Author

jessestricker commented Feb 17, 2022

It is considered a best practise to "namespace" your public facing targets. This makes them look like the the targets CMake makes available from find_package(...), like Boost::boost or Qt::Widgets.
So it became a convention a lot of projects follow. Here are some sources giving more elaborate reason:

@Saalvage Saalvage merged commit 302f158 into doctest:dev Feb 17, 2022
@Saalvage
Copy link
Member

Thanks for your contribution!

@jessestricker jessestricker deleted the jessestricker-alias-with-main branch February 17, 2022 22:05
hurricane1026 pushed a commit to clapdb/doctest that referenced this pull request Nov 3, 2022
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.

2 participants