-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57052/
-----------------------------------------------------------

(Updated March 1, 2017, 12:42 a.m.)


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


Changes
-------

Emit build_config.hpp into build directory, instead of source directory. Rename 
config to build_config.


Summary (updated)
-----------------

CMake: Add `build_config.hpp.in` for `BUILD_TIME` variables.


Bugs: MESOS-7172
    https://issues.apache.org/jira/browse/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 `build_config.hpp.in` and emits `build_config.hpp` with the
`BUILD_TIME`, `BUILD_DATE`, and `BUILD_USER` variables defined.
It also sets `HAVE_BUILD_CONFIG_H` 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/build_config.hpp.in PRE-CREATION 

Diff: https://reviews.apache.org/r/57052/diff/


Testing
-------

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.


Thanks,

Andrew Schwartzmeyer

Reply via email to