<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Hello,</div><div><br></div><div>I would like to loop on a list of libraries to download and install, by calling the ExternalProject_Add command for each of these libraries.</div><div>To do that, I need to define some commands for each library, like CONFIGURE_COMMAND, BUILD_COMMAND and INSTALL_COMMAND.</div><div>These commands may differ from one library to another; for example, some of them may be based on make, or autoconfig, or cmake, etc.</div><div>Furthermore, some of these libraries may not need to be built.</div><div><br></div><div>What is the good way to skip some steps?</div><div><span style="font-size: 12pt;">Is it possible to use default values for some commands?</span></div><div><br></div><div>The problem in my situation is that I have to fill in each command since I want to design way of downloading and installing third party libraries.</div><div>To be clear, I wrote a loop which looks like this:</div><div><br></div><div>==========================================================================</div><div>foreach(LIBRARY IN LISTS NOT_FOUND_LIBRARIES)</div><div>    ExternalProject_Add(${${LIBRARY}_LOWERNAME}</div><div>                                       PREFIX ${${LIBRARY}_PREFIX}</div><div>                                       URL ${${LIBRARY}_URL}</div><div>                                       CONFIGURE_COMMAND ${${LIBRARY}_CONFIGURE_COMMAND}</div><div>                                       BUILD_COMMAND ${${LIBRARY}_BUILD_COMMAND}</div><div>                                       INSTALL_COMMAND ${${LIBRARY}_INSTALL_COMMAND}</div><div>                                     )</div><div>endforeach(LIBRARY)</div><div>==========================================================================</div><div><br></div><div>However, if a library is based on cmake, I do not need to specify commands for configuration and building.</div><div>Is it possible to say that the default value of CONFIGURE_COMMAND will be used for example?</div><div>The only way I know to do that is to suppress the line defining CONFIGURE_COMMAND but I can't do that since other libraries may need to define it.</div><div><br></div><div>To skip steps, I replace the corresponding command by 'ls' but it's not very clean.</div><div>That is to say, the value of ${LIBRARY}_CONFIGURE_COMMAND is 'ls' when I want to skip the configuration step.</div><div><br></div><div>Thank you very much for your help.</div><div><br></div><div>Cédric</div><div><br></div></div></body></html>