CMake/Tests/RunCMake/get_filename_component
Brad King 31f73eb12d get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics
The KWSys `SystemTools::SplitProgramFromArgs` implementation goes into
an infinite loop when the value is just " " (a space).  Since the
"program path with unquoted spaces plus command-line arguments"
operation it is trying to provide is poorly defined (string parsing
should not depend on filesystem content), just stop using it.

Instead consider the main two use cases the old approach tried to handle:

* The value is the name or absolute path of a program with no quoting
  or escaping, but also no command-line arguments.  In this case we
  can use the value as given with no parsing, and assume no arguments.

* The value is a command-line string containing the program name/path
  plus arguments.  In this case we now assume that the command line
  is properly quoted or escaped.

Fixes: #17262
2017-09-13 10:47:04 -04:00
..
CMakeLists.txt get_filename_component: Tests now check for proper CACHE usage. 2015-08-06 17:53:12 +00:00
KnownComponents.cmake get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics 2017-09-13 10:47:04 -04:00
RunCMakeTest.cmake get_filename_component: Add explicit unit tests 2013-04-16 09:35:29 -04:00
UnknownComponent-result.txt get_filename_component: Add explicit unit tests 2013-04-16 09:35:29 -04:00
UnknownComponent-stderr.txt get_filename_component: Add explicit unit tests 2013-04-16 09:35:29 -04:00
UnknownComponent.cmake get_filename_component: Add explicit unit tests 2013-04-16 09:35:29 -04:00