[CMake] Building a Version Header

Clark Gaebel cg.wowus.cg at gmail.com
Wed Jul 7 21:44:42 EDT 2010

I would like to generate file that looks something like this:

    // version.h
    #define VERSION "v0.1-345-ga77ede8"

where the version string is the result of running "git describe --tags
--dirty". How can I auto-generate this file, include it in my project,
and have it regenerate as a pre-build event?


More information about the CMake mailing list