utility_source.rst 940 B

123456789101112131415161718192021222324
  1. utility_source
  2. --------------
  3. Disallowed. See CMake Policy :policy:`CMP0034`.
  4. Specify the source tree of a third-party utility.
  5. ::
  6. utility_source(cache_entry executable_name
  7. path_to_source [file1 file2 ...])
  8. When a third-party utility's source is included in the distribution,
  9. this command specifies its location and name. The cache entry will
  10. not be set unless the ``path_to_source`` and all listed files exist. It
  11. is assumed that the source tree of the utility will have been built
  12. before it is needed.
  13. When cross compiling CMake will print a warning if a ``utility_source()``
  14. command is executed, because in many cases it is used to build an
  15. executable which is executed later on. This doesn't work when cross
  16. compiling, since the executable can run only on their target platform.
  17. So in this case the cache entry has to be adjusted manually so it
  18. points to an executable which is runnable on the build host.