CPM.cmake icon indicating copy to clipboard operation
CPM.cmake copied to clipboard

Strip whitespace from OPTION_VALUE (fixes #635)

Open dwuertz opened this issue 1 year ago • 1 comments

If key and value in OPTIONS lines are separated by more than a single space, the remaining whitespace is currently included in the OPTION_KEY, apparently causing the setting to be ignored (see #635), for some reason I don't fully understand. Stripping the excess whitespace fixes #635 and seems to be a reasonable thing to do in general.

dwuertz avatar Apr 08 '25 20:04 dwuertz

Maybe CPM should force -D := (https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-D) syntax

flagarde avatar Apr 10 '25 14:04 flagarde