Menu

#41 Complete quoting for parameters of some CMake commands

open
simon (7)
3
2011-03-09
2011-02-26
No

Some parameters (like "${CMAKE_CURRENT_SOURCE_DIR}/cmake" and "${INCLUDE_INSTALL_DIR}/simon") are passed to CMake commands in your build scripts without enclosing them by quotation marks.
http://speech2text.git.sourceforge.net/git/gitweb.cgi?p=speech2text/speech2text;a=blob;f=CMakeLists.txt;hb=d8946c4dd867cd3a08d8c7b8ca29cb1ae91a1c5b#l6

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.
http://cmake.org/Wiki/CMake/Language_Syntax#CMake_splits_arguments_unless_you_use_quotation_marks_or_escapes.

Discussion

  • Peter Grasch

    Peter Grasch - 2011-03-09

    Looking forward to your patch :)

     
  • Peter Grasch

    Peter Grasch - 2011-03-09
    • priority: 5 --> 3
     
  • Markus Elfring

    Markus Elfring - 2011-03-10

    I would prefer the patch integration for the feature requests #3193382 and #3193419 before this one.
    Otherwise: I have got the feeling that merge conflicts might happen.

     
  • Peter Grasch

    Peter Grasch - 2011-03-27

    Both those requests have been merged. Go ahead :)

     
MongoDB Logo MongoDB