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

cmake: Add ENABLE_GIT_VERSION to avoid rebuilding #7171

Merged
merged 1 commit into from Jan 11, 2016

Conversation

tchaikov
Copy link
Contributor

it is a pain to see something like
"expected plugin ./ec_plugins/libec_jerasure.so version
v10.0.1-1239-g73c5763 but it claims to be v10.0.1-1241-gdb83f12
instead" from time to time. so this is a cmake port of b227426 by @dmick .
the option ENABLE_GIT_VERSION is ON by default. if it is set OFF,
ceph_ver.h will not be recreated.

Signed-off-by: Kefu Chai kchai@redhat.com

it is a pain to see something like
"expected plugin ./ec_plugins/libec_jerasure.so version
 v10.0.1-1239-g73c5763 but it claims to be v10.0.1-1241-gdb83f12
 instead" from time to time. so this is a cmake port of b227426.
the option ENABLE_GIT_VERSION is ON by default. if it is set OFF,
ceph_ver.h will not be recreated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@wjwithagen
Copy link
Contributor

@tchaikov
A solution like this would also be appreciated in the regular make config.
I keep running into this over and over. Even worse, some tests fail because they think that the loadable libraries are from a different version, and thus refuse to load. The tests then fail.
Thus incrementing my compile time even more.
So I reverted to disableing this check in the erasure dlopen code.
But this setting might be usefull here as well.

@tchaikov
Copy link
Contributor Author

A solution like this would also be appreciated in the regular make config.

@wjwithagen you mean disable it using something like

make ENABLE_GIT_VERSION=OFF

?

@wjwithagen
Copy link
Contributor

@tchaikov
I feel very green and wet behind the ears...
Thanx for the pointer.

@tchaikov
Copy link
Contributor Author

@wjwithagen sorry, Willem. i am not following you. i thought you were suggesting that we can enable/disable when calling "make" instead of running "configure".

and the pr here enables developer to disable GIT_VERSION using

cmake -DENABLE_GIT_VERSION=OFF

which is sort of the configure stage of cmake.

cbodley added a commit that referenced this pull request Jan 11, 2016
cmake: Add ENABLE_GIT_VERSION to avoid rebuilding
@cbodley cbodley merged commit 6e65447 into ceph:master Jan 11, 2016
@wjwithagen
Copy link
Contributor

@tchaikov I was recompiling all this time, every time I added something to my repo. Which was getting annoying. So I would be happy with either a configure or Makefile switch.

I only glanced over the Make code to see how to get it to ignore that.
But that code was so very obvious that I just overlooked it.

As it turns out both configure and make(1) are able to accommodate me.
Thank you for pointing me in the right direction.

@tchaikov tchaikov deleted the wip-enable-git-version branch January 11, 2016 15:58
@tchaikov
Copy link
Contributor Author

oh, the same to me when i am moving to cmake. glad that it helps you also =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants