[CMake] ctest script and setting my own envvars

Sean McBride sean at rogue-research.com
Mon Oct 29 13:04:20 EDT 2007


Hi all,

If I create a ctest script (.cmake), can I set my own environment
variables?  I have the following:

# set any extra envionment varibles here
SET (CTEST_ENVIRONMENT
"RR_WARNINGS_COMMON=-Wall -Wextra"
"RR_WARNINGS_C=${RR_WARNINGS_COMMON} -Wno-deprecated-declarations"
"RR_WARNINGS_CXX=${RR_WARNINGS_COMMON} -Woverloaded-virtual"
"RR_DEBUG_C=-gdwarf-2"
"RR_DEBUG_CXX=-gdwarf-2 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC"
"CFLAGS=${RR_WARNINGS_C} ${RR_DEBUG_C}"
"CXXFLAGS=${RR_WARNINGS_CXX} ${RR_DEBUG_CXX}"
)

What I'm trying to do is separate Debug-only, Release-only, C-only, and C
++-only settings into separate env vars.  This would allow me to keep my
temp env vars the same in all my scripts, and I would only need to
change CFLAGS and CXXFLAGS like above.

But it doesn't seem to work. :(  There is no error, but the flags are
not being applied.

Thanks for any help!

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



More information about the CMake mailing list