[CMake] Using -DOPTION="something=moof" mangles the OPTION value to "something:UNINITIALIZED=moof"
Michael Hertling
mhertling at online.de
Tue Aug 30 08:37:01 EDT 2011
On 08/30/2011 12:04 PM, Marcus Fritzsch wrote:
> Hallo again.
>
> On 8/30/11, Marcus Fritzsch <fritschy at googlemail.com> wrote:
>> [...]
>> % cmake "-DCMAKE_CXX_FLAGS=-O3 -march=native" ..
>> ...
>> % grep "CXX_FLAGS=" CMakeCache.txt
>> CMAKE_CXX_FLAGS=-O3 -march:UNINITIALIZED=native
>
> Having done some more tests, it looks like when searching the '=' to
> add the type information to the option is doing a search from the back
> of the string:
>
> % cmake "-DCMAKE_CXX_FLAGS=-a -one=1 -two=2" ..
> ...
> % grep CXX_FLAGS= CMakeCache.txt
> CMAKE_CXX_FLAGS=-a -one=1 -two:UNINITIALIZED=2
>
> Cheers,
> Marcus
Strange... The zsh is my personal favourite, too, but I can't observe
the behaviour you report. In order to narrow down this issue, may you
- give CMake 2.8.5 a try, although it is probably not a CMake quirk,
- use another shell, e.g. bash, to rule out a zsh misconfiguration,
- use apostrophe quoting to tell the shell to keep its hands off?
Regards,
Michael
More information about the CMake
mailing list