[CMake] Problems with CMP0037
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sun Nov 2 12:30:12 EST 2014
Eike said:
>Because you can't create files or directories with that name, you
>would end up
>getting one directory "tests" and a file/directory win32_test*. And
>creating
>both with one API call isn't possible, so this may work if there is a
>directory "tests" before because of some other reason, but it will not
>reliably work.
Hi Eike:
I just want to confirm something about your answer. The OP
was getting complaints about a _target_ with a slash in the name. At
the CMake level there is a huge distinction between targets and files.
Are you saying that at least for some generators a target eventually
ends up as a filename (e.g., at the configured Makefile level) with
exactly the same name as the target so a slash propagates to that filename? I
agree if that were the case, it could cause issues on Unix platforms
if the "directory" portion of the filename was not independently
created first.
If this is actually the case, I am somewhat surprised that CMake
exposes such implementation details at the CMake level. For example,
it should be possible to use a unique hash of target names when
creating the corresponding configured filename such that the filename
does not include any characters such as "/" that have special meaning
at the file level on some platforms.
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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________
More information about the CMake
mailing list