I'm trying to pass a definition in the compiler flags in my C++ project configured with CMake as shown below, as suggested in the post here:
execute_process(COMMAND git describe --abbrev=4 --dirty --always --tags
OUTPUT_VARIABLE GIT_VERSION)
add_definitions(-DVERSION="\\"${GIT_VERSION}\\"")
I'm seeing a lexing error. How do I add quotes around the variable for compiler definitions?
My desired output is
-DVERSION="v1.0"