build: Use commit date instead of build date to avoid unnecessary rebuilds. 73/85373/3
authorJunghyun Kim <jh0822.kim@samsung.com>
Thu, 25 Aug 2016 00:14:08 +0000 (09:14 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Fri, 26 Aug 2016 13:16:13 +0000 (22:16 +0900)
commitc74c199cfbab5d54dad0046b0d747ace552aebe4
treec071ed53aaaeb457ddee7f014169afdc5faad329
parent405a74929803f3cdc5f72d873759ee5072228c23
build: Use commit date instead of build date to avoid unnecessary rebuilds.

- Problem
We use OBS to build packages in Tizen.
There is a mechanism not to rebuild when the result binary is the same.
For example, there is a dependency graph: A->B->C.
If A is modified, B would be built.
If the result RPM of B is not changed, OBS does not trigger a build of C.
To effectively use this mechanism, each packages make sure that
the result binary should be the same if the input source is the same.

There is a reason we found is including build date.

In coregl, bash command 'date' is used in CMakeList.txt.
In this case, everytime we build coregl, the build result is always different.

- Solution
Use commit date instead of build date.
There was a hint in Makefile.
COMPILE_DATE = "\"`git log -1 --pretty=format:%ci`\""
I used this command in CMakeList.txt
I tested this in my test OBS server, and the build result is unchanged
when this patch is applied.

Change-Id: Iea70e74b6808aa81905eba4afc9e72b6867c097d
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
CMakeLists.txt