Skip to content

Add a CMake-based build system

Louis Moureaux requested to merge lmoureau/ProtoDarwin:feature/cmake into master

The following features are supported:

  • Compiling all existing libraries
  • Creating the ROOT dictionnary
  • Compiling all executables
  • Compiling all tests
  • Discovering dependencies using scram when in a CMSSW environment
  • Installing built executables and libraries

Missing features:

  • Installing prefix commands
  • Compiling with the current git commit SHA
  • CTest support
  • firefox/latex/doxygen targets
  • Documentation

Since CMake doesn't have native libgit2 support, I copied files from Kde's extra-cmake-modules package. The copied files are FindLibGit2.cmake and ECMFindModuleHelpers.cmake. I had to fix a small bug in FindLibGit2.cmake.

I do not understand why there are two preprocessor variables for the commit SHA, one passed to MetaInfo.cc and the other to every single compiler command. -> one internal, one external to be overriden by dependent code

The Looper test fails. This is also the case when using the Makefile to build it. It seems that the test is not run by the Makefile at all.

I determined that the firefox and latex targets would be hard to implement reliably in CMake.

I also added a CI job using CTest to produce a JUnit test report and uploading it to Gitlab.

See issue #13 (closed).

Edited by Louis Moureaux

Merge request reports