mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-09 10:00:12 -05:00
try_compile: Rename SOURCE_FROM_ARG -> SOURCE_FROM_CONTENT
Change the SOURCE_FROM_ARG keyword to try_compile to SOURCE_FROM_CONTENT (which we can do because it was recently added and hasn't been in a release yet). The new name should be clearer as to what it does, and also more consistent with the CONTENT arguments to some other commands. Also, fix a typo in an error message.
This commit is contained in:
@@ -59,10 +59,10 @@ Try Compiling Source Files
|
||||
.. code-block:: cmake
|
||||
|
||||
try_compile(<resultVar>
|
||||
<SOURCES <srcfile...>] |
|
||||
SOURCE_FROM_ARG <name> <content>] |
|
||||
SOURCE_FROM_VAR <name> <var>] |
|
||||
SOURCE_FROM_FILE <name> <path> >...
|
||||
<SOURCES <srcfile...>] |
|
||||
SOURCE_FROM_CONTENT <name> <content>] |
|
||||
SOURCE_FROM_VAR <name> <var>] |
|
||||
SOURCE_FROM_FILE <name> <path> >...
|
||||
[NO_CACHE]
|
||||
[CMAKE_FLAGS <flags>...]
|
||||
[COMPILE_DEFINITIONS <defs>...]
|
||||
@@ -194,7 +194,7 @@ The options are:
|
||||
``OUTPUT_VARIABLE <var>``
|
||||
Store the output from the build process in the given variable.
|
||||
|
||||
``SOURCE_FROM_ARG <name> <content>``
|
||||
``SOURCE_FROM_CONTENT <name> <content>``
|
||||
.. versionadded:: 3.25
|
||||
|
||||
Write ``<content>`` to a file named ``<name>`` in the operation directory.
|
||||
@@ -202,7 +202,7 @@ The options are:
|
||||
the contents of the file are dynamically specified. The specified ``<name>``
|
||||
is not allowed to contain path components.
|
||||
|
||||
``SOURCE_FROM_ARG`` may be specified multiple times.
|
||||
``SOURCE_FROM_CONTENT`` may be specified multiple times.
|
||||
|
||||
``SOURCE_FROM_FILE <name> <path>``
|
||||
.. versionadded:: 3.25
|
||||
@@ -218,10 +218,11 @@ The options are:
|
||||
.. versionadded:: 3.25
|
||||
|
||||
Write the contents of ``<var>`` to a file named ``<name>`` in the operation
|
||||
directory. This is the same as ``SOURCE_FROM_ARG``, but takes the contents
|
||||
from the specified CMake variable, rather than directly, which may be useful
|
||||
when passing arguments through a function which wraps ``try_compile``. The
|
||||
specified ``<name>`` is not allowed to contain path components.
|
||||
directory. This is the same as ``SOURCE_FROM_CONTENT``, but takes the
|
||||
contents from the specified CMake variable, rather than directly, which may
|
||||
be useful when passing arguments through a function which wraps
|
||||
``try_compile``. The specified ``<name>`` is not allowed to contain path
|
||||
components.
|
||||
|
||||
``SOURCE_FROM_VAR`` may be specified multiple times.
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ Try Compiling and Running Source Files
|
||||
.. code-block:: cmake
|
||||
|
||||
try_run(<runResultVar> <compileResultVar>
|
||||
<SOURCES <srcfile...>] |
|
||||
SOURCE_FROM_ARG <name> <content>] |
|
||||
SOURCE_FROM_VAR <name> <var>] |
|
||||
SOURCE_FROM_FILE <name> <path> >...
|
||||
<SOURCES <srcfile...>] |
|
||||
SOURCE_FROM_CONTENT <name> <content>] |
|
||||
SOURCE_FROM_VAR <name> <var>] |
|
||||
SOURCE_FROM_FILE <name> <path> >...
|
||||
[NO_CACHE]
|
||||
[CMAKE_FLAGS <flags>...]
|
||||
[COMPILE_DEFINITIONS <defs>...]
|
||||
|
||||
Reference in New Issue
Block a user