[cmake-developers] patch building and testing

Brad King brad.king at kitware.com
Fri Jan 8 11:31:01 EST 2016


On 01/07/2016 10:36 PM, Mike Fitzgerald wrote:
> I wanted to fix an issue (#13666)

Great!

> 1.) Cloned the git repo, ran bootstrap and make.
> 2.) Wrote some code in cmVisualStudio10TargetGenerator.cxx.
> 
> Running make again didn't seem to recompile anything

On what platform did you build?  That source file is used only on
Windows platforms.  It won't compile at all on Linux or OS X hosts
so it is not expected to re-compile after modification on those
platforms.

> There appears to be a full suite of tests in the Tests folder

After compiling, run

 bin/ctest

to run the tests.  If you used a VS (or Xcode) generator then run

 bin/Debug/ctest -C Debug

where "Debug" is whatever configuration you built after generating.

You don't actually have to use the bootstrap script to build for
development.  You can configure/build CMake with an already-installed
CMake.  This is required on Windows to build with VS.  With this
approach you should run the tests using the ctest that comes next to
the already-installed cmake you ran to configure the build tree.

-Brad



More information about the cmake-developers mailing list