[CMake] CTest as a shell

Richard Wackerbarth rkw at dataplex.net
Fri Nov 6 07:56:11 EST 2009


I'm trying to run a number of dashboards ( various projects and  
configurations) from a single script.

Since the script is intemately involved in the setup of CMake/CTest  
variables, it would appear that CTest should be a good scripting  
language for the purpose.

So I take my working ctest script and turn it into a function

- - -
function(run_dashboard)
# <snip> -- All of the usual stuff here
endfunction(run_dashboard)

set(xxx "ONE")
run_test()
set(xxx "TWO")
run_test()

- - -

It does what I want but complains that I did not set  
CTEST_SOURCE_DIRECTORY, CTEST_BINARY_DIRECTORY, and CTEST_COMMAND at  
the top scope. (Never mind that, at that level, I am just using ctest  
as a scripting language and have no desire for it to run any tests.

Shouldn't we be able to invoke ctest as a shell?

Richard


More information about the CMake mailing list