cmake: replace EXEC_PROGRAM with EXECUTE_PROCESS to fix CMake warning
Fixed the following warning(s):
CMake Warning (dev) at cmake/tools.cmake:15 (EXEC_PROGRAM):
Policy CMP0153 is not set: The exec_program command should not be called.
Run "cmake --help-policy CMP0153" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Use execute_process() instead.
Call Stack (most recent call first):
CMakeLists.txt:23 (GET_VERSION)
This warning is for project developers. Use -Wno-dev to suppress it.
One thing to note is that now the command output will have a final \n
in their output.