2014-08-03 19:52:23 +02:00
|
|
|
utility_source
|
|
|
|
--------------
|
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
Disallowed since version 3.0. See CMake Policy :policy:`CMP0034`.
|
2014-08-03 19:52:23 +02:00
|
|
|
|
|
|
|
Specify the source tree of a third-party utility.
|
|
|
|
|
2023-05-23 16:38:00 +02:00
|
|
|
.. code-block:: cmake
|
2014-08-03 19:52:23 +02:00
|
|
|
|
|
|
|
utility_source(cache_entry executable_name
|
|
|
|
path_to_source [file1 file2 ...])
|
|
|
|
|
|
|
|
When a third-party utility's source is included in the distribution,
|
|
|
|
this command specifies its location and name. The cache entry will
|
2015-11-17 17:22:37 +01:00
|
|
|
not be set unless the ``path_to_source`` and all listed files exist. It
|
2014-08-03 19:52:23 +02:00
|
|
|
is assumed that the source tree of the utility will have been built
|
|
|
|
before it is needed.
|
|
|
|
|
2015-11-17 17:22:37 +01:00
|
|
|
When cross compiling CMake will print a warning if a ``utility_source()``
|
2014-08-03 19:52:23 +02:00
|
|
|
command is executed, because in many cases it is used to build an
|
|
|
|
executable which is executed later on. This doesn't work when cross
|
|
|
|
compiling, since the executable can run only on their target platform.
|
|
|
|
So in this case the cache entry has to be adjusted manually so it
|
|
|
|
points to an executable which is runnable on the build host.
|