[cmake-developers] Unit testing of new generators

Brad King brad.king at kitware.com
Fri May 1 09:46:19 EDT 2015


On 05/01/2015 09:31 AM, Josh Green wrote:
> When generating the build directory, I should use:
> /dev/build> cmake.exe ..\CMake -DBUILD_TESTING=ON
> 
> then I should build CMake using visual studio.

You shouldn't need to enable testing /dev/build since that would
just run tests with the Visual Studio generator.  You can do

 /dev/build-fastbuild> ..\build\bin\debug\Cmake.exe -G Fastbuild ..\CMake -DBUILD_TESTING=ON

since that is a CMake built with your generator.  Then build
that version before running ctest.

> then I should do the following:
> /dev/build-fastbuild> ctest

You should use

 ..\build\bin\debug\ctest

since only that ctest knows about the Fastbuild generator.

Is the Fastbuild generator a single or multi-config generator?
In other words, does one select the build configuration with
CMAKE_BUILD_TYPE when running CMake or later at build time?

> So what kind of tests will this run?

It will run the entire test suite that we normally run for
nightly testing.

> Is this documented anywhere?

The CMake_TEST_EXTERNAL_CMAKE option is undocumented because
it was created for use in configuring our nightly testing
infrastructure.  I only suggested it in case you didn't have
everything built, but now that I see your layout you shouldn't
need it.

-Brad



More information about the cmake-developers mailing list