[cmake-developers] Severe behavioural change regressions in release branch

Ben Boeckel ben.boeckel at kitware.com
Mon Oct 27 21:22:45 UTC 2014


On Tue, Oct 28, 2014 at 09:58:58 +1300, Ben Cooksley wrote:
> If anyone is interested, help would be appreciated to get a Contracts
> style build up and running.
> In particular, pointers to documentation on how to perform such builds
> would be appreciated - we'll need to run "make install" for parts of
> it which doesn't seem to happen in any of the existing examples as far
> as I can see.

Since it's a CMake build, ExternalProject should make it fairly
straightforward. A quick sketch of the non-boilerplate code I see in the
current contracts tests:

    externalproject_add(kdelibs
      GIT_REPOSITORY [...]
      GIT_TAG        [...] # The oldest supported release.
      CMAKE_ARGS
        [...]
      INSTALL_DIR    "${CMAKE_CURRENT_BINARY_DIR}/install")
    externalproject_add(someotherkdelib
      DEPENDS        kdelibs
      GIT_REPOSITORY [...]
      GIT_TAG        [...] # The oldest supported release.
      CMAKE_ARGS
        # Might not be necessary.
        "-DCMAKE_MODULE_PATH={$CMAKE_CURRENT_BINARY_DIR}/install/lib/cmake"
        [...]
      INSTALL_DIR    "${CMAKE_CURRENT_BINARY_DIR}/install")

The rationale for using the oldest supported release is so that we make
sure whatever was written *then* still works today.

--Ben


More information about the Kde-buildsystem mailing list