I'm trying to pass a variable to ctest that will only be evaluated at
runtime.
If I hand edit the add_test command I can get it to work, the hand edited
add test looks like:
add_test(piotest "runjob" "--np" "4" "--block" "$ENV{COBALT_PARTITION}" ":"
"/gpfs/piotest")
But I can't get cmake to generate this line for me, it either evaluates
$ENV{COBALT_PARTITION} at build time or it escapes the $ so that I have:
add_test(piotest "runjob" "--np" "4" "--block" "\$ENV{COBALT_PARTITION}"
":" "/gpfs/piotest")
and it never gets evaluated. The statement I am working with is
set(REQUIRED_OPTION --block \$ENV{COBALT_PARTITION} )
set(EXE_CMD ${RUNJOB} ${RUNJOB_NPF} ${REQUIRED_OPTION}
${MPIEXEC_PREFLAGS} : ${_testExe} ${_testArgs})
Any ideas?
--
Jim Edwards
CESM Software Engineer
National Center for Atmospheric Research
Boulder, CO
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake