On 2010-01-03 11:44-0800 Alan W. Irwin wrote:

[...]
COMMAND DUMMY=${CMAKE_CURRENT_BINARY_DIR} printenv DUMMY

This works fine if there are no embedded blanks in CMAKE_CURRENT_BINARY_DIR,
and the bash result of the above cmake COMMAND in a custom target is

DUMMY=/home/software/plplot_svn/HEAD/build_dir/examples printenv DUMMY

with the expected output

/home/software/plplot_svn/HEAD/build_dir/examples

However, if CMAKE_CURRENT_BINARY_DIR has an embedded blank, e.g.,

/home/software/plplot svn/HEAD/build_dir/examples

then the resulting generated command is

"DUMMY=/home/software/plplot svn/HEAD/build_dir/examples" printenv DUMMY

which gives the bash error

/bin/sh: DUMMY=/home/software/plplot svn/HEAD/build_dir/examples: No such
file or directory

because bash does not like quotes around variable assignment statements.

To solve this issue, VERBATIM should simply put the quotes around everything
after the equal sign when there are embedded blanks, e.g.,

DUMMY="/home/software/plplot svn/HEAD/build_dir/examples" printenv DUMMY

which I have verified works fine on the bash command line.  If the CMake
developers here agree that is a VERBATIM bug, I will write up the
appropriate bug report in the cmake bug tracker to keep track of the issue.

Response, please?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
_______________________________________________
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

Reply via email to