[CMake] Trouble with EXTERNALPROJECT_ADD, configure, and CFLAGS

Dan Kegel dank at kegel.com
Tue Oct 25 13:09:14 EDT 2011


On Tue, Oct 25, 2011 at 10:05 AM, Dan Kegel <dank at kegel.com> wrote:
>    CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/celt/configure -C --prefix=${CMAKE_BINARY_DIR}/prefix --disable-shared --with-pic  CFLAGS="-g -O2 -fPIC"

Turns out the workaround is

    CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/celt/configure -C
--prefix=${CMAKE_BINARY_DIR}/prefix --disable-shared --with-pic
CFLAGS=-g\ -O2\ -fPIC

That's just freaky.  I've never seen backslashes and double-quotes
behave differently like that.  I guess quotes are "stickier" in cmake
than in shell.
- Dan


More information about the CMake mailing list