<div dir="ltr">Dear all, <div><br></div><div class="cye-lm-tag">I'm using ExternalProjectAdd to build an external package. </div><div class="cye-lm-tag"><br></div><div class="cye-lm-tag">On the CONFIGURE_COMMAND I have to pass some variables to the configure script in this form:</div><div class="cye-lm-tag"><br></div><div class="cye-lm-tag">configure CPPFLAGS="-I/dir/include -L/dir/lib" </div><div class="cye-lm-tag"><br></div><div class="cye-lm-tag">To do this I use </div><div class="cye-lm-tag"><br></div><div class="cye-lm-tag">CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${CMAKE_BINARY_DIR}/configure CPPFLAGS="-I/dir/include -L/dir/lib" </div><div class="cye-lm-tag"><br></div><div class="cye-lm-tag">However, when cmake issues that command (you can see that with make VERBOSE=1) it wraps the CPPFLAGS parameters with quotation marks (as below) and the configure script fails</div><div class="cye-lm-tag"><br clear="all"><div class="cye-lm-tag"><div class="gmail-cye-lm-tag cye-lm-tag">configure "CPPFLAGS=\"-I/dir/include -L/dir/lib\""</div><div class="gmail-cye-lm-tag"><br></div><div class="gmail-cye-lm-tag cye-lm-tag">Below you can find a minimal CMakeLists.txt to test this. </div><div class="gmail-cye-lm-tag cye-lm-tag"><br></div><div class="gmail-cye-lm-tag cye-lm-tag">I'd appreciate any help on how I'd remove those quotation marks.</div><div class="gmail-cye-lm-tag cye-lm-tag"> </div><div class="gmail-cye-lm-tag cye-lm-tag">Thanks</div><div class="gmail-cye-lm-tag cye-lm-tag"><br></div><div class="gmail-cye-lm-tag cye-lm-tag">Edo</div><div class="gmail-cye-lm-tag cye-lm-tag"><br></div><div class="gmail-cye-lm-tag cye-lm-tag"><br></div><div class="gmail-cye-lm-tag cye-lm-tag"><br></div><div class="gmail-cye-lm-tag cye-lm-tag">cmake_minimum_required(VERSION 3.9.0)<br><br>project(libACE)<br>include(ExternalProject)<br><br>#create a configure script<br>file(WRITE ${CMAKE_SOURCE_DIR}/configure <br>"<br>#! /bin/bash<br><br>echo $0 received $# parameters<br><br>for arg <br>do echo $arg<br>done<br>")<br>file(COPY ${CMAKE_SOURCE_DIR}/configure <br>     DESTINATION ${CMAKE_BINARY_DIR}<br>     FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)<br>ExternalProject_Add(<br>  external_test<br>  GIT_REPOSITORY <a href="https://github.com/paskino/libace-conda">https://github.com/paskino/libace-conda</a><br>  GIT_TAG origin/master<br>    <br>  CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${CMAKE_BINARY_DIR}/configure NVCCFLAGS="-Idir -Ldir" CPPFLAGS="-Idirc -Ldirl"<br><br>  BUILD_COMMAND ""<br>  INSTALL_COMMAND ""<br><br>  LOG_INSTALL 1<br>  BINARY_DIR ${CMAKE_BINARY_DIR}/build/<br>  INSTALL_DIR ${CMAKE_BINARY_DIR}/install<br>  STAMP_DIR ${CMAKE_BINARY_DIR}/stamp<br>  TMP_DIR ${CMAKE_BINARY_DIR}/tmp<br>  DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/download<br>  SOURCE_DIR ${CMAKE_BINARY_DIR}/source<br>)<br></div><div class="gmail-cye-lm-tag"><br></div></div>-- <br><div dir="ltr" class="gmail_signature cye-lm-tag" data-smartmail="gmail_signature"><div dir="ltr" class="cye-lm-tag"><div class="cye-lm-tag"><div dir="ltr" class="cye-lm-tag"><div>Edo</div><div class="cye-lm-tag">I know you think you understand what you thought I said, but I'm not sure you realize that what you heard is not what I meant (prob. Alan Greenspan)<br>:wq</div></div></div></div></div></div></div>