Menu

#285 CMake fails if build path contains spaces

Incomplete
closed-accepted
None
5
2014-11-17
2014-07-14
No

This addresses the issues that Ch3ck_ reported on irc last week.

It seems there are some inconsistencies in how some CMake commands expand variables. Textual substitution when source or build path contains spaces doesn't escape spaces in some cases.

The issue is somewhat related to this [1].

I've compared the build after applying my patch with the build that contain spaces in it's path and their size is not identical. They're quite different, specially some man pages are not generated in the former build.

I'm somewhat worried that the resulting build doesn't complete properly even tough I thoroughly compared CMake output and error logs and they're pretty much identical,

I also tried adding double quotes on the CMAKE_BINARY_DIR var in the file processed by configure_file:
set(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
and that didn't make any difference either.

Any thoughts on this?

Mihai

[1] http://osdir.com/ml/programming.tools.cmake.user/2006-02/msg00328.html

1 Attachments

Discussion

  • Cliff Yapp

    Cliff Yapp - 2014-11-17

    This looks similar to issues we have periodically with sh scripts where spaces are present in pathnames but also an active element in the script logic. Quoting is usually the solution - it often happens that less-used logic paths don't get tested under conditions that will trigger this sort of issue. Patch applied - it might be helpful to do the distcheck-odd_pathnames test on a system with as many installed src/other deps as possible to further exercise the Find logic.

     
  • Cliff Yapp

    Cliff Yapp - 2014-11-17
    • status: open --> closed-accepted
    • assigned_to: Sean Morrison --> Cliff Yapp
     

Log in to post a comment.