<div dir="ltr"> <div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Replicating ExternalProject would be a lot of work...<br></blockquote><div><br></div></div>One approach commonly used with CMake modules that change frequently upstream is for the project to keep a local copy and have a check in place to use CMake's version if new enough. For instance, in llvm's source tree:<br><br>cmake/modules/ExternalProject.cmake:<br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">if(CMAKE_VERSION VERSION_LESS "3.5.1")<br></span></div><div class="gmail_extra"><span style="font-family:monospace,monospace"> include(${PROJECT_SOURCE_DIR}/cmake/modules/newcmake/ExternalProject.cmake)<br></span></div><div class="gmail_extra"><span style="font-family:monospace,monospace">else()<br></span></div><div class="gmail_extra"><span style="font-family:monospace,monospace"> include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)<br></span></div><div class="gmail_extra"><span style="font-family:monospace,monospace">endif()</span><br><br></div><div class="gmail_extra">cmake/modules/newcmake/ExternalProject.cmake - Copy of the ExternalProject.cmake shipped with 3.5.1<br><br></div><div class="gmail_extra">Then in the top level CMakeLists.txt, just include(ExternalProject). It will first load the version-check sicne that's in the module path and then load CMake's copy if new enough, otherwise llvm's copy. This way you can keep the minimum CMake version for the project at 3.4.3, but make sure that your always using ExternaProject from at least 3.5.1.<br><br></div></div>