Complete quoting for parameters of some CMake commands

Bug #1437427 reported by Markus Elfring
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Won't Fix
Undecided
Unassigned

Bug Description

Some parameters (like "${PROJECT_SOURCE_DIR}/CMakeModules" and "${KICAD_DATA}/scripting/plugins") are passed to CMake commands in your build scripts without enclosing them by quotation marks.
https://github.com/KiCad/kicad-source-mirror/blob/d5e70c93d9be4e138bb26a6f78452466ff6b8cb5/CMakeLists.txt#L16
https://github.com/KiCad/kicad-source-mirror/blob/0dd9efd9db8fc67b8e312cc09b67324838c60246/pcbnew/CMakeLists.txt#L672

I see that these places will result in build difficulties if the contents of the used variables will contain special characters like semicolons.

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.

tags: added: cmake
tags: added: code-cleanup
Revision history for this message
Jeff Young (jeyjey) wrote :

I guess if this hasn't bitten us in the last 3 years, and in that same time no one has volunteered to fix it, then it's not going to get fixed.

Changed in kicad:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.