[CMake] [PATCH] support for CTEST_INITIAL_CACHE in new-style ctest script
Bill Hoffman
bill.hoffman at kitware.com
Thu Nov 13 21:55:43 EST 2008
Alexander Neundorf wrote:
> Well, it would be quite backward compatible, so it would just work for users expecting to set() this variable.
>
I don't think this needs to be backwards compatible. People might expect
the other variables from the declarative style to do something as well.
> Or a quite similar solution as you propose:
> set(my_cache "FOO:STRING=foo
> BAR:STRING=bar
> ")
>
> ctest_configure(... INITIAL_CACHE "${my_cache}")
>
>
> Or a bit more different, where the user doesn't have to know about the format of the cmake cache:
> set(FOO foo)
> set(BAR bar)
>
> ctest_configure(... CMAKE_VARS FOO BAR)
>
> So the user would just tell ctest_configure() which variables to hand
>
over to cmake, and ctest_configure() would then write the CMakeCache.txt
(or a cmake script to be preloaded using -C).
Or we could stick with the current file(WRITE CMakeCache.txt) approach...
-Bill
More information about the CMake
mailing list