[cmake-developers] Testing that solution contains what it should

Brad King brad.king at kitware.com
Tue Oct 9 16:57:09 EDT 2012


On 10/09/2012 04:32 PM, Petr Kmoch wrote:
> Is there a standard mechanism (perhaps something like the macro check_cmake_test()) to test that a generated buildsystem (specifically, Visual Studio solution)
> contains what it should? If not, are there some test for this which I could take insipration from?

AFAIK the only test that actually checks the content of a .sln
file directly was added here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a30258d

All other tests just verify that the generated build system
behaves as expected (with varying degrees of completeness).

> I found a test (SourceGroups) which I believe would require similar functionality, but it doesn't seem to actually inspect the generated solution

That is a very old test and it pre-dated much of our current
testing capabilities.  IIRC it just verifies that projects
actually build when source groups are set, but not that the
IDE actually presents the groups.  The latter is quite hard
to do robustly but perhaps some kind of .vcproj / .vcxproj.filters
parsing could be added to the test.

-Brad



More information about the cmake-developers mailing list