mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <>
Subject Re: Review Request 57052: CMake: Add `` for `BUILD_TIME` variables.
Date Wed, 01 Mar 2017 22:18:29 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated March 1, 2017, 10:18 p.m.)

Review request for mesos, Alex Clemmer, Joseph Wu, and Michael Park.


Update per Joe's comments; also add license and header guard to `build_config.hpp`.

Bugs: MESOS-7172

Repository: mesos

Description (updated)

Commit c7fc1377b introduced a bug that prevented any incremental
recompilation. By defining the `BUILD_TIME` in `MESOS_CPPFLAGS`,
every build was seen as having a root dependency (the flags)
changed, causing a rebuild of every single source in Mesos.

This patch introduces a CMake `configure_file` directive which
takes in `` and emits `build_config.hpp` with the
`BUILD_TIME`, `BUILD_DATE`, and `BUILD_USER` variables defined.
It also sets `USE_CMAKE_BUILD_CONFIG` which `build.cpp` uses to `#include`
the configuration file. The result is that the date, time, and user
are set at the point of configuration (invocation of CMake) instead
of at build, thus allowing for incremental rebuilds.

Diffs (updated)

  cmake/CompilationConfigure.cmake 7808d1a0086a7999991af8dcb2dd796b9424c7d5 
  src/common/build.cpp 090b59fb22bfc00516d65f501f8f18cd85a5b4cd 
  src/common/ PRE-CREATION 




cmake; make && make check on Linux
cmake; VS build stout-tests and mesos-tests, then repeat and see no compilation take place
a second time. Also support\windows-build.bat twice.


Andrew Schwartzmeyer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message