https://github.com/IBM/GEDS/blob/main/doc/BUILDING.md#linux
Replace CMAKE_VERSION=3.22.4 with export CMAKE_VERSION=$(cmake --version | grep -oP '\d+(\.\d+)(\.\d+)') to export the device's cmake version into an environment variable, which is then used in the subsequent command.
Check if environment variable is correctly set via
printenv | grep CMAKE_VERSION