-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Inconsistencies in how to include doctest.h #670
Comments
Hi, I wonder how we resolve the include path issue? From the tutoral, it is the user's responsibility to track down the (absolute) search path to
|
The cmake definition could be trivially modified to change this, e.g. eli-schwartz@3c27fd0 Hopefully someone could confirm whether this is indeed desirable... |
This is a bit of a bikeshed wart (that is, ugly but not important). I suggest we close this as there is no solution better than the other here. |
Your answer makes sense only if you assume that doctest should NOT be packaged by distros due to being impossible to use correctly. It's not a bikeshed wart. You should document your API contract and make sure it works as documented. The current state of the documentation is inconsistent and freely mixes the idea of copying the source into your project vs getting a copy from Ubuntu. |
Why is this even being held up as a positive thing? ... In fact, I am not entirely sure why C++ projects, specifically, believe that repeating the same word twice (installing a header to |
Not sure why you think I am holding it up as a positive thing, it's just a fact, and I am quite indifferent to it. C++ is a bit different from many other languages in the sense that there is no standardized package manager. Nevertheless, every project need some way of specifying doctest as their dependency. Those that do it with CMake by downloading the source code and setting up the include path as done in the tutorial, well, they are responsible for the resulting include path as well. In the tutorial the doctest include folder is appended to the If you use doctest distributed by a package manager it should always be If you want to do something you can update the docs to make use the install tree instead and make this more consistent. |
Hi @eli-schwartz . My stance in the question is shifting. This thing can only be improved to help people get a more consistent experience. I missed your previous comment also, I'll elaborate a bit.
I agree, and I think it should be
It acts as a namespace for the projects, and is necessary for extensions to work. |
I tried to follow the Tutorial.md with the following CMakeLists.txt:
Trying to build this failed:
The following meson.build did work though:
The obvious distinction would seem to be the include path provided by the doctest target, which seems entirely insufficient in cmake.
The text was updated successfully, but these errors were encountered: