[cmake-developers] I'm sure this is often asked
J Decker
d3ck0r at gmail.com
Fri Jul 29 02:08:29 EDT 2011
Any reason that environment variables can't be used as cmake
variables? Like of course any cmake variable in a script would
override the environment, but if it's not otherwise found, checking in
the environemnt would make scripts prettier.
set BUILD_TYPE=debug
set BUILD_MONOLITHIC=1
cmake /path/to/source
instead of having to pass -DBUILD_TYPE=debug -DBUILD_MONOLITHIC which
gets strung out all on one line usually. some longer varaibles might
be -DSACK_INTERSHELL_SDK_ROOT_PATH=$SACK_INTERSHELL_SDK_ROOT_PATH
or appropriate bash/batch syntax as applicable.
More information about the cmake-developers
mailing list