[CMake] ExternalProject_Add with flexible install commands

Knox, Kent Kent.Knox at amd.com
Thu Feb 25 01:04:32 EST 2016


I am having a problem passing parameters as a variable into ExternalProject_Add(). I seem to be fighting syntax, i've tried many different variants with the set() statement


#######################

# Default behavior is to NOT install library, empty quotes should disable install
set( libxxx_inst_comm INSTALL_COMMAND "\"\"" )

# Build the library as an external project
  ExternalProject_Add( libxxx
    SOURCE_DIR ${PROJECT_SOURCE_DIR}/src
    ${libxxx_inst_comm}
  )
#######################

I get this message, which appears to be within ExternalProject_add() using add_custom_command.  Is there a way around this?


CMake Error at /opt/homebrew-cask/Caskroom/cmake/3.2.2/CMake.app/Contents/share/cmake-3.2/Modules/ExternalProject.cmake:1487 (add_custom_command):

  COMMAND may not contain literal quotes:


    ""

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160225/3d123438/attachment.html>


More information about the CMake mailing list