[CMake] Using -DOPTION="something=moof" mangles the OPTION value to "something:UNINITIALIZED=moof"

Marcus Fritzsch fritschy at googlemail.com
Tue Aug 30 06:04:49 EDT 2011


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


More information about the CMake mailing list