[petsc-dev] Fwd: cmake issue

Jed Brown jed at 59A2.org
Thu Dec 16 10:11:21 CST 2010


On Thu, Dec 16, 2010 at 03:41, Barry Smith <bsmith at mcs.anl.gov> wrote:

> Note that configure/make handles what I do just fine but Jed's cmake had
> trouble and suggested changing configure to move the variables.


Using CC="gcc -m32" literally means that spaces in paths cannot be
supported.  BuildSystem mostly doesn't support spaces in paths out of
laziness.  But if commands are created in a way that the above will work,
then paths cannot possibly have spaces.  CMake functions correctly with
spaces in paths at the cost of having to treat the compiler path separately
from flags.

I propose attempting to find CC="/long string/with -spaces" as a single path
first and if that fails, break it on spaces, try to use the first item as a
compiler, and put the rest into the various flags variables.  That won't
work on "/long string/with -spaces", but it will work for "gcc -flags" and
"/path/to/gcc -flags".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101216/d7a2c613/attachment.html>


More information about the petsc-dev mailing list