The variable CTEST_INITIAL_CACHE is ignored in new-style (CTEST_BUILD() command based) ctest scripts.<div><br></div><div>Instead, you should use:</div><div><br></div><div>FILE(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "</div>
MAKECOMMAND:STRING=nmake -i<br>CMAKE_MAKE_PROGRAM:FILEPATH=nmake<br>CMAKE_GENERATOR:INTERNAL=NMake Makefiles<br>BUILDNAME:STRING=Win32-nmake71<br>SITE:STRING=VOGON.kitware<br>CVSCOMMAND:FILEPATH=C:/cygwin/bin/cvs.exe<br><div>
")</div><div><br></div><div>(But only on a clean build, after calling CTEST_EMPTY_BINARY_DIRECTORY("${CTEST_BINARY_DIRECTORY}"), or perhaps only if the CMakeCache.txt does not exist in the first place...)</div>
<div><br></div><div>HTH,</div><div>David</div><div><br><br><div class="gmail_quote">On Mon, Nov 10, 2008 at 5:33 AM, Martin Apel <span dir="ltr"><<a href="mailto:martin.apel@simpack.de">martin.apel@simpack.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">Eric Noulard wrote:<br>
> 2008/11/9 Alexander Neundorf <<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>>:<br>
> [...]<br>
><br>
><br>
>> commands can be executed.<br>
>><br>
>> IMO this can make setting up Nightly builds much easier.<br>
>><br>
><br>
> Looks interesting, I didn't ever thought ctest scripting was done for that.<br>
> I did shell scripts for that and was wondering how to do it on Windows :-)<br>
><br>
> Now I know.<br>
><br>
><br>
>> What do you think ?<br>
>> One thing which is still missing is a way how to get variables predefined into<br>
>> the cmake-configure run during ctest_configure().<br>
>> Does this have to be done by writing an initial CMakeCache.txt ?<br>
>><br>
><br>
> This seems possible using "CTEST_INITIAL_CACHE"<br>
> as shown here:<br>
> <a href="http://www.vtk.org/Wiki/CMake_Scripting_Of_CTest" target="_blank">http://www.vtk.org/Wiki/CMake_Scripting_Of_CTest</a><br>
><br>
> # this is the initial cache to use for the binary tree, be careful to escape<br>
> # any quotes inside of this string if you use it<br>
> SET (CTEST_INITIAL_CACHE "<br>
> MAKECOMMAND:STRING=nmake -i<br>
> CMAKE_MAKE_PROGRAM:FILEPATH=nmake<br>
> CMAKE_GENERATOR:INTERNAL=NMake Makefiles<br>
> BUILDNAME:STRING=Win32-nmake71<br>
> SITE:STRING=VOGON.kitware<br>
> CVSCOMMAND:FILEPATH=C:/cygwin/bin/cvs.exe<br>
> ")<br>
><br>
</div>I recently played around with nightly builds as well. I used to have a<br>
setup for experimental builds, but never could get the svn checkout to<br>
run. With the approach described above, I was finally able<br>
to run checkout from svn from within ctest. Unfortunately it seems that<br>
some variables are not used anymore with this approach of generating builds.<br>
I found that CTEST_INITIAL_CACHE as well as CTEST_ENVIRONMENT seem to be<br>
ignored, when using CTEST_BUILD etc. For the environment variables I<br>
could get it to work by setting<br>
the environment variables explicitly, e.g. 'SET (ENV{CC} "gcc-4.2")'.<br>
That means that the approach proposed above does not work, at least not<br>
for me.<br>
<br>
After all I'm somewhat confused about this new approach ignoring some of<br>
the variables. Maybe someone with a deeper knowledge of ctest could<br>
explain, what's going on here.<br>
<br>
Regards,<br>
<br>
Martin<br>
____________<br>
Virus checked by G DATA AntiVirus<br>
Version: AVF 19.138 from 09.11.2008<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>