I did include(ExternalProject) ExternalProject_Add( CeltTarget SOURCE_DIR ${CMAKE_SOURCE_DIR}/celt INSTALL_DIR ${CMAKE_BINARY_DIR}/prefix CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/celt/configure -C --prefix=${CMAKE_BINARY_DIR}/prefix --disable-shared --with-pic CFLAGS="-g -O2 -fPIC" )
but configure failed when I typed 'make', saying configure: error: in `/home/dank/foo/build/CeltTarget-prefix/src/CeltTarget-build': configure: error: C compiler cannot create executables See `config.log' for more details. config.log said configure:3552: checking whether the C compiler works configure:3574: gcc "-g -O2 -fPIC" conftest.c >&5 gcc: error: "-g: No such file or directory So, it seems to be a quoting problem. (Removing the quotes doesn't work, of course, since then configure complains that there's no such option -O2.) Has anyone else run into this? What's the right way to pass in cflags to the configure script in ExternalProject_Add? http://www.mail-archive.com/cmake@cmake.org/msg26433.html looks related. $ cmake --version cmake version 2.8.5 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake