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

git_get_exact_tag and new tags #36

Open
pdgendt opened this issue Apr 10, 2015 · 2 comments
Open

git_get_exact_tag and new tags #36

pdgendt opened this issue Apr 10, 2015 · 2 comments

Comments

@pdgendt
Copy link

pdgendt commented Apr 10, 2015

Adding a new git tag does not force a re-configure if cmake variables with git_get_exact_tag

git_get_exact_tag(GIT_TAG)
if(NOT GIT_TAG)
    set(GIT_TAG "")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gitinfo.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/gitinfo.cpp)

Some files:

gitinfo.h

extern const char g_GIT_TAG[];

gitinfo.cpp.in

#define GIT_TAG "@GIT_TAG@"
const char g_GIT_TAG[] = GIT_TAG;
@rpavlik
Copy link
Owner

rpavlik commented Apr 15, 2015

Hmm. Is there a file with a known location that we can watch to trigger a re-configure?

@pdgendt
Copy link
Author

pdgendt commented Apr 16, 2015

I suppose you could check for changes in .git/refs/tags

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

No branches or pull requests

2 participants