[cfe-dev] [llvm-dev] Fwd: Raising CMake minimum version to 3.4.3
Chuck Atkins via cfe-dev
cfe-dev at lists.llvm.org
Wed Apr 27 12:01:18 PDT 2016
> > Replicating ExternalProject would be a lot of work...
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:
if(CMAKE_VERSION VERSION_LESS "3.5.1")
cmake/modules/newcmake/ExternalProject.cmake - Copy of the
ExternalProject.cmake shipped with 3.5.1
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev