[CMake] Using a ctest script, while avoiding the make clean step

Nils Gladitz nilsgladitz at gmail.com
Fri Jul 4 03:49:41 EDT 2014


On 07/04/2014 09:25 AM, Angelos Mantzaflaris wrote:
>
> Dear all,
>
>
>  From the ctest man pages I read:
>
>     --build-noclean
>            Skip the make clean step.
>
> I am running ctest with a script, e.g.
>
> ctest -S testScript.cmake
>
> for a continuous build. With a minor change in the repository, the full
> code
> is recompiled. So I was thinking to invoke build-noclean. I cannot figure
> out how..
>
> How can I avoid the make clean step when calling
>
> ctest_build
>
> inside my script ?
>
> thanx in advance


I think --build-noclean only applies when using --build-and-test.

In script mode ctest_build() does not run the clean target by default so 
the issue is probably somewhere else.

For a clean build in script mode I'd expect e.g. a call to 
ctest_empty_binary_directory().

Nils


More information about the CMake mailing list