79713212

Date: 2025-07-24 10:53:51
Score: 1
Natty:
Report link

To get the full path of a target output in a CMake managed project using the File API, the most reliable way is to check the "artifacts" field in the target.json. This usually includes the relative or absolute path to the built output like executables or libraries. If it's a relative path, you can safely prepend it with the paths.build value. Avoid relying only on nameOnDisk, as it gives just the base file name. This approach has worked well in my scripts for collecting target outputs.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Srivatsa Palepu