79615398

Date: 2025-05-10 10:50:35
Score: 1
Natty:
Report link

If you are getting the variable from execute_command output, you can do the same with OUTPUT_STRIP_TRAILING_WHITESPACE:

execute_process(
    COMMAND git describe --tags
    OUTPUT_VARIABLE VERSION
    OUTPUT_STRIP_TRAILING_WHITESPACE
)
add_compile_definitions(VERSION="${VERSION}")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Daniel G