COIN-OR::LEMON - Graph Library

Opened 6 years ago

Closed 5 years ago

#434 closed enhancement (done)

Phase out Autotools in favor of CMAKE

Reported by: alpar Owned by: alpar
Priority: blocker Milestone: LEMON 1.3 release
Component: build system Version: hg main
Keywords: Cc:
Revision id:

Description (last modified by alpar)

The most important missing feature of the CMAKE based build environment is the generation of the release tarball. The good thing is that cmake needs basically no generated files (like the configure script and the files in case of Autotools). Still, it should generate

  • cmake/version.cmake and
  • the HTML documentation

and add them to the release tarbal.

Change History (7)

comment:1 Changed 6 years ago by alpar

  • Owner changed from ladanyi to alpar

comment:2 Changed 6 years ago by alpar

  • Description modified (diff)
  • Summary changed from CMAKE based release tarball creation to Phase out Autotools in favor of CMAKE

comment:3 Changed 6 years ago by alpar

I pushed three changesets to the repo:

  • [cdd2c7dad989] cleans up all the Autotool related files.
  • [0b9a94956916] replaces scripts/ with direct use of hg templating from cmake. The default version string is determined as follows.
    • If cmake/version.cmake exists in the source tree (i.e. when compiling a release tarball) the version string comes from there. Else
    • if LEMON_VERSION shell environment is defined, it will be used. Else
    • if the source is a hg checkout, the version string will be determined az follows.
      • If the current version is tagged, we use that as a version string. If the tag starts with letter "r", it will be stripped.
      • Otherwise the version string is LATESTTAG+DIST-HASH, where
        • LATESTTAG is the latest tagged ancestor revision, or trunk if there is no tagged ancestor
        • DIST is the length of the longest path between LATESTTAG and the current revision in the history graph.
        • HASH is the short hash id of the current reviosion.
    • Otherwise the version string is set the hg-tip.

The default setting above can of course be overwritten by the LEMON_VERSION cmake variable (e.g.

cmake -DLEMON_VERSION='myversion'


  • [fc1aa7c01c55] adds a make dist target. It creates the release tarball with and without doc and the documentation alone, both in tar.gz and is zip format in all case. In addition it makes the documentation generation more clever.
    • If the source tree has a doc/html directory (i.e. we compile from a release tarball with doc), and there is no doc/html in the build dir, the pre-generated doc will be copied to the latter place, therefore make install will install it.
    • When make html is run, then it will overwrite the original (only in the build dir, of course), thus make install will install the new version.

Now, I believe all the features of the autotool build environment are also provided by the cmake version.

I still keep this ticket open for some time. Please check the cmake config and tarball generation in all the possible use-case scenarios and the available platforms and report any problem you may encounter.

comment:4 follow-up: Changed 6 years ago by kpeter

I find the cmake-based testing a bit incomfortable. The summary correctly indicates which tests failed (if any), but no other information is shown. E.g.:

The following tests FAILED:
         29 - min_mean_cycle_test (OTHER_FAULT)
Errors while running CTest

The console output of the test cases are redirected to the file <builddir>/Testing/Temporary/LastTest.log. Actually, it does not seem to be an obvious place to check if someone is looking for the console output. (I found it only by recursively searching for the last modified files in the build directory. :))

Is there an easier/better way for obtaining the console output of failed test cases?

comment:5 in reply to: ↑ 4 Changed 6 years ago by alpar

Replying to kpeter:

Is there an easier/better way for obtaining the console output of failed test cases?

I would run the failed test by hand:

$ ./test/min_mean_cycle_test

It is indeed one step more complicated than it was with autotools, but I personally can live with it, so gave up trying to find any better solution.

comment:6 Changed 6 years ago by kpeter

Okay. It's not a big deal, I admit.

comment:7 Changed 5 years ago by alpar

  • Resolution set to done
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.