On a linux machine, from a cmake project, I\'m trying to call git using execute_process so that I can include info from source control into my app.
I created a littl
You have to pass the arguments as a second option like this:
cmake_minimum_required (VERSION 2.8)
set (git_cmd "git")
set (git_arg "--version")
message(STATUS "git cmd: ${git_cmd}")
execute_process(COMMAND ${git_cmd} ${git_arg}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_ver)
message(STATUS "git ver[${git_result}]: ${git_ver}")