Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cmake TIMESTAMP function #2848

Closed
wants to merge 1 commit into from
Closed

Use cmake TIMESTAMP function #2848

wants to merge 1 commit into from

Conversation

bmwiedemann
Copy link
Contributor

@bmwiedemann bmwiedemann commented Sep 6, 2017

because it is not only platform independent
but also allows to override the build date
This helps to make ceph builds reproducible (that includes a fork of rockdb in a submodule)

Also adds UTC flag, to be independent of timezone.

Requires cmake-2.8.11+ from 2013

@siying
Copy link
Contributor

siying commented Sep 7, 2017

CC some people recently touching this file. @chfast @benesch @BusyJay . We'll merge when you think it is ready.

Copy link
Contributor

@chfast chfast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

CMakeLists.txt Outdated
string(REGEX REPLACE "\n" "" DATETIME ${DATETIME})
set(GIT_DATE_TIME "${DATETIME}")
endif()
string(TIMESTAMP ${GIT_DATE_TIME} "%Y/%m/%d %H:%M:%S" UTC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to update cmake_minimum_required to use TIMESTAMP.

@facebook-github-bot
Copy link
Contributor

@bmwiedemann updated the pull request - view changes

@BusyJay
Copy link
Contributor

BusyJay commented Sep 8, 2017

LGTM

because it is not only platform independent
but also allows to override the build date
to make ceph builds reproducible

Requires cmake-2.8.11+ from 2013
@facebook-github-bot
Copy link
Contributor

@bmwiedemann updated the pull request - view changes

@yiwu-arbug
Copy link
Contributor

Merging.

@facebook-github-bot
Copy link
Contributor

@yiwu-arbug has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

BusyJay pushed a commit to BusyJay/rocksdb that referenced this pull request Nov 21, 2017
Summary:
because it is not only platform independent
but also allows to override the build date
This helps to make ceph builds reproducible (that includes a fork of rockdb in a submodule)

Also adds UTC flag, to be independent of timezone.

Requires cmake-2.8.11+ from 2013
Closes facebook#2848

Differential Revision: D5820189

Pulled By: yiwu-arbug

fbshipit-source-id: e3e8c1550e10e238c173f6c5d9ba15f71ad3ce28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants