I don't think I'm "mixing sources". Not on purpose, anyway.
I followed the walk through to create my Visual Studio solution, which results in the same thing as using the template provided. CppUTest is in its own project in the solution; my unit tests are in their own project in it. Your recommended method differs from this, right?
I do consider cpputest's stdint internal, so yes, I want my project to ignore it. Can you recommend any links on how to implement your suggestion in recent versions of VS?
Thanks,
cpengr
--
You received this message because you are subscribed to a topic in the Google Groups "cpputest" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cpputest/OS4OkxpK0QY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Also, depending on your version of CppUTest, you may simply delete [stdint.h]. I also deleted it from the current Head on Github.
I'm tracking HEAD, so thanks for this update.
> In your own projects, you may include whatever version of stint.h you see fit -- this is totally independent of CppUTest.
I agree that it should be, but it wasn't... (Read on.)
> In your project, you should have the following include paths set:
>
> <root>\CppUTest\include
> <root>\CppUTestExt\include
> <your-own-include-paths>
I followed docs/WalkThrough_VS21010.docx pretty closely to set up my solution and project. Currently, my unit test project is set to "Inherit [additional include directories] from parent or project defaults", which results in inheriting $(CPPUTEST_INCLUDE_PATHS).
CPPUTEST_INCLUDE_PATHS of course is defined as a User Macro in the CppUTest_VS2010 property sheet:
$(CPPUTEST_HOME)\include;
$(CPPUTEST_HOME)\include\CppUTestExt\CppUTestGTest;
$(CPPUTEST_HOME)\include\CppUTestExt\CppUTestGMock;
$(CPPUTEST_HOME)\include\Platforms\VisualCpp <-- item of interest
Interestingly, the include paths of the CppUTest project are only these:
.\include
.\include\Platforms\VisualCpp
It is also set to inherit, but to no additional effect. (Not even $(CPPUTEST_HOME).)
...Is all of the above expected and correct? It doesn't seem to align with what you wrote (quoted above).
Big picture: going forward, I think it would be best to separate CppUTest's public from private includes. I think this is already mostly the case(?), but it seems to me that one of the following is probably true.
1. include/Platforms/VisualCpp/ was intended as a private directory, and thus should not have been included in CPPUTEST_INCLUDE_PATHS.
2. include/Platforms/VisualCpp/ is intentionally public, but there should have been a private Platforms directory, and stdint.h should have been there.
Do you agree? Which one?
> CppUTest strives very hard not to use stdint types at all, so as to maintain compatibility with old compilers
Why not just have your own privately as needed by platform?
Thank you kindly for your work and help.
cpengr
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
--
> My first throught is that VS is different due to the lack of precompiled binaries and a package manager.I'm not sure I know what you mean about the lack of precompiled binaries. Could you clarify?
Here is an idea:
- Have a push-button cpputest solution in the repo that can be used to generate static .libs.
- Have another solution (using the libs) in the repo which is the template for users.
- Periodically package the user solution with the libs and headers in a zip file as a release download.
- Probably with a release script...
- Also document how to generate these things, for users who want to stay more current, or branch/fork cpputest.
- Users doing this might want to use e.g. git submodules or svn externals to peg versions.
What do you think?
> For Mac and Linux, most people use the apt-get or homebrew packages I guess. Windows doesn’t have an as standard package manager AFAIK.I understood about the package manager. It’s the "precompiled binaries" part that I'm unclear on.
> Of course, you’re welcome to chime in. The Windows support could definitively need some additional help.Maybe. Time and expertise depending. We’ll see, no promises, etc.
Sorry for the delay; got sidetracked. I do intend to get back to this...