Skip to content

git_get_exact_tag and new tags #36

@pdgendt

Description

@pdgendt

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;

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions