mesos-reviews mailing list archives

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

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

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


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


Changes
-------

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


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 `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/build_config.hpp.in PRE-CREATION 


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

Changes: https://reviews.apache.org/r/57052/diff/2-3/


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


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