diff options
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/add_custom_command.rst | 5 | ||||
-rw-r--r-- | Help/command/configure_file.rst | 9 | ||||
-rw-r--r-- | Help/command/site_name.rst | 4 | ||||
-rw-r--r-- | Help/command/target_sources.rst | 6 |
4 files changed, 21 insertions, 3 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 231f9da..a28b0b1 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -239,6 +239,11 @@ The options are: command itself. Using ``DEPFILE`` with other generators than Ninja is an error. + If the ``DEPFILE`` argument is relative, it should be relative to + :variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the + ``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR` + (see policy :policy:`CMP0116`.) + Build Events ^^^^^^^^^^^^ diff --git a/Help/command/configure_file.rst b/Help/command/configure_file.rst index c59995a..8d66a9b 100644 --- a/Help/command/configure_file.rst +++ b/Help/command/configure_file.rst @@ -6,8 +6,9 @@ Copy a file to another location and modify its contents. .. code-block:: cmake configure_file(<input> <output> + [FILE_PERMISSIONS <permissions>...] [COPYONLY] [ESCAPE_QUOTES] [@ONLY] - [NO_SOURCE_PERMISSIONS] + [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS] [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ]) Copies an ``<input>`` file to an ``<output>`` file and substitutes @@ -72,6 +73,9 @@ The arguments are: If the path names an existing directory the output file is placed in that directory with the same file name as the input file. +``FILE_PERMISSIONS <permissions>...`` + Use user provided permissions for the output file. + ``COPYONLY`` Copy the file without replacing any variable references or other content. This option may not be used with ``NEWLINE_STYLE``. @@ -88,6 +92,9 @@ The arguments are: The copied file permissions default to the standard 644 value (-rw-r--r--). +``USE_SOURCE_PERMISSIONS`` + Transfer the file permissions of the original file to the output file. + ``NEWLINE_STYLE <style>`` Specify the newline style for the output file. Specify ``UNIX`` or ``LF`` for ``\n`` newlines, or specify diff --git a/Help/command/site_name.rst b/Help/command/site_name.rst index 1bcaead..09b5a9f 100644 --- a/Help/command/site_name.rst +++ b/Help/command/site_name.rst @@ -6,3 +6,7 @@ Set the given variable to the name of the computer. .. code-block:: cmake site_name(variable) + +On UNIX-like platforms, if the variable ``HOSTNAME`` is set, its value +will be executed as a command expected to print out the host name, +much like the ``hostname`` command-line tool. diff --git a/Help/command/target_sources.rst b/Help/command/target_sources.rst index 653b8d7..07fb937 100644 --- a/Help/command/target_sources.rst +++ b/Help/command/target_sources.rst @@ -15,7 +15,8 @@ Specifies sources to use when building a target and/or its dependents. Relative source file paths are interpreted as being relative to the current source directory (i.e. :variable:`CMAKE_CURRENT_SOURCE_DIR`). The named ``<target>`` must have been created by a command such as -:command:`add_executable` or :command:`add_library` and must not be an +:command:`add_executable` or :command:`add_library` or +:command:`add_custom_target` and must not be an :ref:`ALIAS target <Alias Targets>`. The ``INTERFACE``, ``PUBLIC`` and ``PRIVATE`` keywords are required to @@ -27,7 +28,8 @@ items will populate the :prop_tgt:`SOURCES` property of when building dependents. (:ref:`IMPORTED targets <Imported Targets>` only support ``INTERFACE`` items because they are not build targets.) The following arguments specify sources. Repeated calls for the same -``<target>`` append items in the order called. +``<target>`` append items in the order called. The targets created by +:command:`add_custom_target` can only have ``PRIVATE`` scope. Arguments to ``target_sources`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` |