#63 Complete quoting for parameters of some CMake commands

closed-invalid
nobody
None
1
2014-04-01
2014-03-07
No

Some parameters (like "${CMAKE_SOURCE_DIR}" and "${CMAKE_CURRENT_BINARY_DIR}") are passed to CMake commands in your build scripts without enclosing them by quotation marks. I see that these places will result in build difficulties if the contents of the used variables will contain special characters like spaces.

I would recommend to apply advices from a Wiki article.

Discussion

  • DRC

    DRC - 2014-03-18

    I cannot reproduce any build failures when the source directory or the build directory contain spaces. I don't make it a habit of fixing hypothetical bugs, so please send me a specific test case if there is one.

     
    • Markus Elfring

      Markus Elfring - 2014-04-01

      Would you like to integrate the attached update suggestion into your source file repository?

       
      Last edit: Markus Elfring 2014-04-01
  • DRC

    DRC - 2014-03-27
    • Status: open --> open-need-info-from-submitter
     
  • Markus Elfring

    Markus Elfring - 2014-03-31

    Would you also like to test what will happen here if an involved directory would contain space characters and semicolons?

     
  • DRC

    DRC - 2014-03-31

    I did. I tested with spaces in both the source directory and build directory. CMake handled both flawlessly. I'll ask again-- please send me more details on how to reproduce this. What version of CMake are you using when it fails? Or is this actually failing at all? The post is somewhat ambiguous. It isn't clear whether you were actually experiencing a bug or whether you were just hypothesizing that one might occur. If it's the latter, then this is a waste of time unless you can show me something concrete.

     
  • DRC

    DRC - 2014-03-31

    A "bug" is a reproducible problem with our source code or binaries built from it. If this problem can be reproduced with our source code, then show me how. I do not have time to pore over external mailing lists.

     
    • Markus Elfring

      Markus Elfring - 2014-03-31

      How do you think about to try out a directory name like "contains s p a c e s;COPYONLY; ESCAPE_QUOTES"?

       
  • DRC

    DRC - 2014-03-31

    How about you try it and let me know if it fails? I repeat: bug reports are for confirmed failures, not hypothetical failures.

     
    • Markus Elfring

      Markus Elfring - 2014-03-31

      I have tried out my example for a special directory name. Now it seems that something fails before the really interesting commands will be executed from your main build script.

      Response from the application "CMake GUI 2.8.12.2":

      CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:90 (file):
        file Internal CMake error when trying to open file:
        /home/elfring/Projekte/Bau/libjpeg-turbo/contains s p a c e s for writing.
      Call Stack (most recent call first):
      ...
      
       
  • DRC

    DRC - 2014-03-31

    You are aware, are you not, that our CMake build system is only used for Windows builds? You cannot use it on Unix/Linux.

     
    • Markus Elfring

      Markus Elfring - 2014-04-01

      I do not understand this limitation so far.
      The tool "CMake" supports more build platforms (if I do not fiddle with special directory names).

       
  • DRC

    DRC - 2014-04-01

    This is pointless. Please take the time to read the documentation, including BUILDING.txt, which clearly describes the dual build system that libjpeg-turbo uses. If you can reproduce a failure in the CMake build system on Windows, then please post steps to reproduce. The CMake build system is not used on Unix/Linux. Autotools is used on that platform.

    End of story.

     
    • Markus Elfring

      Markus Elfring - 2014-04-01

      I guess that you will stumble on similar surprises in Windows environments if you dare to put a semicolon (which has got a special meaning for the CMake programming language) in directory names.
      (Does the combination with whitespace characters result in any more software development "fun"?)

       
  • DRC

    DRC - 2014-04-01
    • status: open-need-info-from-submitter --> closed-invalid
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks