[CMake] ExternalProject_Add with flexible install commands

Knox, Kent Kent.Knox at amd.com
Thu Feb 25 11:03:59 EST 2016


Hi Petr~

Thanks for your reply.


These set statements do not appear to work.  Either the command 'installs' the dependency, or an error pops up.


set( rocblas_INSTALL_COMMAND INSTALL_COMMAND "" )
--> this installs the dependency

set( rocblas_INSTALL_COMMAND INSTALL_COMMAND " " )
--> /bin/sh: 1:  : not found

set( rocblas_INSTALL_COMMAND INSTALL_COMMAND """" )
--> CMake Warning (dev) in CMakeLists.txt
--> Argument not separated from preceding token by whitespace.

Kent

________________________________
From: Petr Kmoch <petr.kmoch at gmail.com>
Sent: Thursday, February 25, 2016 2:46 AM
To: Knox, Kent
Cc: cmake at cmake.org
Subject: Re: [CMake] ExternalProject_Add with flexible install commands

Hi Kent,

I believe it's not "empty quotes" that disables the install command, it's the empty string. So you should not escape the quotes:


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

# 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}
  )
#######################

Petr

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


More information about the CMake mailing list