You could use -D flags (cmake -Dvar=value -P script.cmake). On Mon, May 2, 2011 at 11:07 AM, David Doria <daviddo...@gmail.com> wrote: > On Mon, May 2, 2011 at 1:57 PM, David Cole <david.c...@kitware.com> wrote: >> script.cmake: >> execute_process(x) >> execute_process(y) >> >> CMakeLists.txt: >> add_test(NAME MyTest COMMAND ${CMAKE_COMMAND} -P >> ${CMAKE_CURRENT_SOURCE_DIR}/script.cmake) >> >> Or, configure the script into the build tree if you need variable values >> from the CMakeLists.txt file and then reference the configured copy instead. >> >> The NAME/COMMAND signature of add_test is only available in 2.8 and later, >> though. > > How are 'x' and 'y' passed to the script.cmake? (I haven't found any > tutorials on .cmake files.) Or are you suggesting I have to make a > separate .cmake file for each of these tests and hard code the name of > the executable in each one? > > David > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > _______________________________________________ Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake