Skip to content

Commit

Permalink
簡譯《cmake-properties(7)》條目至「目标属性——CUDA_ARCHITECTURES」。
Browse files Browse the repository at this point in the history
  • Loading branch information
gwankyun committed Oct 11, 2023
1 parent 426bb17 commit 35220b9
Show file tree
Hide file tree
Showing 27 changed files with 38 additions and 52 deletions.
4 changes: 1 addition & 3 deletions Help/prop_tgt/BINARY_DIR.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ BINARY_DIR

.. versionadded:: 3.4

This read-only property reports the value of the
:variable:`CMAKE_CURRENT_BINARY_DIR` variable in the directory in which
the target was defined.
这个只读属性报告在定义目标的目录中\ :variable:`CMAKE_CURRENT_BINARY_DIR`\ 变量的值。
10 changes: 4 additions & 6 deletions Help/prop_tgt/BUILD_RPATH.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ BUILD_RPATH

.. versionadded:: 3.8

A :ref:`semicolon-separated list <CMake Language Lists>` specifying
runtime path (``RPATH``) entries to add to binaries linked in the
build tree (for platforms that support it). By default, CMake sets
the runtime path of binaries in the build tree to contain search
paths it knows are needed to find the shared libraries they link.
Projects may set ``BUILD_RPATH`` to specify additional search paths.
一个\ :ref:`分号分隔的列表 <CMake Language Lists>`,指定要添加到构建树中链接的二进制文\
件中的运行时路径(\ ``RPATH``\ )条目(对于支持它的平台)。默认情况下,CMake在构建树中设\
置二进制文件的运行时路径,以包含它知道需要查找它们链接的共享库的搜索路径。项目可以设置\
``BUILD_RPATH``\ 来指定额外的搜索路径。

The build-tree runtime path will *not* be used for binaries in the
install tree. It will be replaced with the install-tree runtime path
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/BUILD_RPATH_USE_ORIGIN.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BUILD_RPATH_USE_ORIGIN

.. versionadded:: 3.14

Whether to use relative paths for the build ``RPATH``.
是否为构建\ ``RPATH``\ 使用相对路径。

This property is initialized by the value of the variable
:variable:`CMAKE_BUILD_RPATH_USE_ORIGIN`.
Expand Down
5 changes: 2 additions & 3 deletions Help/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ BUILD_WITH_INSTALL_NAME_DIR

.. versionadded:: 3.9

``BUILD_WITH_INSTALL_NAME_DIR`` is a boolean specifying whether the macOS
``install_name`` of a target in the build tree uses the directory given by
:prop_tgt:`INSTALL_NAME_DIR`. This setting only applies to targets on macOS.
``BUILD_WITH_INSTALL_NAME_DIR``\ 是一个布尔值,指定构建树中目标的macOS ``install_name``\
是否使用\ :prop_tgt:`INSTALL_NAME_DIR`\ 给出的目录。此设置仅适用于macOS上的目标。

This property is initialized by the value of the variable
:variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` if it is set when a target is
Expand Down
7 changes: 3 additions & 4 deletions Help/prop_tgt/BUILD_WITH_INSTALL_RPATH.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
BUILD_WITH_INSTALL_RPATH
------------------------

``BUILD_WITH_INSTALL_RPATH`` is a boolean specifying whether to link the target
in the build tree with the :prop_tgt:`INSTALL_RPATH`. This takes precedence
over :prop_tgt:`SKIP_BUILD_RPATH` and avoids the need for relinking before
installation.
``BUILD_WITH_INSTALL_RPATH``\ 是一个布尔值,指定是否将构建树中的目标与\
:prop_tgt:`INSTALL_RPATH`\ 链接起来。这优先于\ :prop_tgt:`SKIP_BUILD_RPATH`,并且避\
免了在安装之前重新链接的需要。

This property is initialized by the value of the
:variable:`CMAKE_BUILD_WITH_INSTALL_RPATH` variable if it is set when a target
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/BUNDLE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BUNDLE
------

This target is a ``CFBundle`` on the macOS.
这个目标是macOS上的\ ``CFBundle``

If a module library target has this property set to true it will be
built as a ``CFBundle`` when built on the mac. It will have the directory
Expand Down
4 changes: 2 additions & 2 deletions Help/prop_tgt/BUNDLE_EXTENSION.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BUNDLE_EXTENSION
----------------

The file extension used to name a :prop_tgt:`BUNDLE`, a :prop_tgt:`FRAMEWORK`,
or a :prop_tgt:`MACOSX_BUNDLE` target on the macOS and iOS.
用于命名macOS和iOS上的\ :prop_tgt:`BUNDLE`\ :prop_tgt:`FRAMEWORK`\ 或\
:prop_tgt:`MACOSX_BUNDLE`\ 目标的文件扩展名。

The default value is ``bundle``, ``framework``, or ``app`` for the respective
target types.
3 changes: 1 addition & 2 deletions Help/prop_tgt/COMMON_LANGUAGE_RUNTIME.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ COMMON_LANGUAGE_RUNTIME

.. versionadded:: 3.12

By setting this target property, the target is configured to build with
``C++/CLI`` support.
通过设置该目标属性,可以将目标配置为使用\ ``C++/CLI``\ 支持进行构建。

The Visual Studio generator defines the ``clr`` parameter depending on
the value of the ``COMMON_LANGUAGE_RUNTIME`` target property:
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
COMPATIBLE_INTERFACE_BOOL
-------------------------

Properties which must be compatible with their link interface
属性,这些属性必须与其链接接口兼容

The ``COMPATIBLE_INTERFACE_BOOL`` property may contain a list of
properties for this target which must be consistent when evaluated as a
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
COMPATIBLE_INTERFACE_NUMBER_MAX
-------------------------------

Properties whose maximum value from the link interface will be used.
将使用来自链接接口的最大值的属性。

The ``COMPATIBLE_INTERFACE_NUMBER_MAX`` property may contain a list of
properties for this target whose maximum value may be read at generate
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
COMPATIBLE_INTERFACE_NUMBER_MIN
-------------------------------

Properties whose maximum value from the link interface will be used.
将使用来自链接接口的最小值的属性。

The ``COMPATIBLE_INTERFACE_NUMBER_MIN`` property may contain a list of
properties for this target whose minimum value may be read at generate
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
COMPATIBLE_INTERFACE_STRING
---------------------------

Properties which must be string-compatible with their link interface
属性,这些属性必须与其链接接口的字符串兼容

The ``COMPATIBLE_INTERFACE_STRING`` property may contain a list of
properties for this target which must be the same when evaluated as a
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPILE_DEFINITIONS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
COMPILE_DEFINITIONS
-------------------

Preprocessor definitions for compiling a target's sources.
编译目标源程序的预处理器定义。

The ``COMPILE_DEFINITIONS`` property may be set to a semicolon-separated
list of preprocessor definitions using the syntax ``VAR`` or ``VAR=value``.
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPILE_FEATURES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COMPILE_FEATURES

.. versionadded:: 3.1

Compiler features enabled for this target.
为此目标启用的编译器特性。

The list of features in this property are a subset of the features listed
in the :variable:`CMAKE_C_COMPILE_FEATURES`, :variable:`CMAKE_CUDA_COMPILE_FEATURES`, and
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPILE_FLAGS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
COMPILE_FLAGS
-------------

Additional flags to use when compiling this target's sources.
编译此目标的源代码时要使用的其他标志。

The ``COMPILE_FLAGS`` property sets additional compiler flags used to
build sources within the target. Use :prop_tgt:`COMPILE_DEFINITIONS`
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/COMPILE_OPTIONS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
COMPILE_OPTIONS
---------------

List of options to pass to the compiler.
要传递给编译器的选项列表。

This property holds a :ref:`semicolon-separated list <CMake Language Lists>`
of options specified so far for its target. Use the
Expand Down
3 changes: 1 addition & 2 deletions Help/prop_tgt/COMPILE_PDB_NAME.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ COMPILE_PDB_NAME

.. versionadded:: 3.1

Output name for the MS debug symbol ``.pdb`` file generated by the
compiler while building source files.
编译器在构建源文件时生成的MS调试符号\ ``.pdb``\ 文件的输出名称。

This property specifies the base name for the debug symbols file.
If not set, the default is unspecified.
Expand Down
3 changes: 1 addition & 2 deletions Help/prop_tgt/COMPILE_PDB_NAME_CONFIG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ COMPILE_PDB_NAME_<CONFIG>

.. versionadded:: 3.1

Per-configuration output name for the MS debug symbol ``.pdb`` file
generated by the compiler while building source files.
编译器在构建源文件时生成的MS调试符号\ ``.pdb``\ 文件的每个配置输出名称。

This is the configuration-specific version of :prop_tgt:`COMPILE_PDB_NAME`.

Expand Down
3 changes: 1 addition & 2 deletions Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ COMPILE_PDB_OUTPUT_DIRECTORY

.. versionadded:: 3.1

Output directory for the MS debug symbol ``.pdb`` file
generated by the compiler while building source files.
编译器在构建源文件时生成的MS调试符号\ ``.pdb``\ 文文件的输出目录。

This property specifies the directory into which the MS debug symbols
will be placed by the compiler. This property is initialized by the
Expand Down
3 changes: 1 addition & 2 deletions Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>

.. versionadded:: 3.1

Per-configuration output directory for the MS debug symbol ``.pdb`` file
generated by the compiler while building source files.
编译器在构建源文件时生成的MS调试符号\ ``.pdb``\ 文件的配置输出目录。

This is a per-configuration version of
:prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY`,
Expand Down
7 changes: 3 additions & 4 deletions Help/prop_tgt/COMPILE_WARNING_AS_ERROR.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ COMPILE_WARNING_AS_ERROR

.. versionadded:: 3.24

Specify whether to treat warnings on compile as errors.
If enabled, adds a flag to treat warnings on compile as errors.
If the :option:`cmake --compile-no-warning-as-error` option is given
on the :manual:`cmake(1)` command line, this property is ignored.
指定是否将编译上的警告视为错误。如果启用,则添加一个标志以将编译上的警告视为错误。如果在\
:manual:`cmake(1)`\ 命令行上给出了\ :option:`cmake --compile-no-warning-as-error`\
选项,则忽略此属性。

This property is not implemented for all compilers. It is silently ignored
if there is no implementation for the compiler being used. The currently
Expand Down
3 changes: 1 addition & 2 deletions Help/prop_tgt/CONFIG_OUTPUT_NAME.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<CONFIG>_OUTPUT_NAME
--------------------

Old per-configuration target file base name.
Use :prop_tgt:`OUTPUT_NAME_<CONFIG>` instead.
旧的配置目标文件基名。使用\ :prop_tgt:`OUTPUT_NAME_<CONFIG>`\ 代替。

This is a configuration-specific version of the :prop_tgt:`OUTPUT_NAME`
target property.
2 changes: 1 addition & 1 deletion Help/prop_tgt/CONFIG_POSTFIX.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<CONFIG>_POSTFIX
----------------

Postfix to append to the target file name for configuration ``<CONFIG>``.
用于添加到配置\ ``<CONFIG>``\ 的目标文件名的后缀。

When building with configuration ``<CONFIG>`` the value of this property
is appended to the target file name built on disk. For non-executable
Expand Down
7 changes: 3 additions & 4 deletions Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ CROSSCOMPILING_EMULATOR

.. versionadded:: 3.3

Use the given emulator to run executables created when crosscompiling.
This command will be added as a prefix to :command:`add_test`,
:command:`add_custom_command`, and :command:`add_custom_target` commands
for built target system executables.
使用给定的模拟器运行交叉编译时创建的可执行文件。该命令将作为前缀添加到构建的目标系统可执行文\
件的\ :command:`add_test`、\ :command:`add_custom_command`\ 和\
:command:`add_custom_target`\ 命令中。

.. versionadded:: 3.15
If this property contains a :ref:`semicolon-separated list <CMake Language
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/C_EXTENSIONS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ C_EXTENSIONS

.. versionadded:: 3.1

Boolean specifying whether compiler specific extensions are requested.
布尔值,指定是否请求特定于编译器的扩展。

This property specifies whether compiler specific extensions should be
used. For some compilers, this results in adding a flag such
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/C_STANDARD.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ C_STANDARD

.. versionadded:: 3.1

The C standard whose features are requested to build this target.
C标准,其特性被要求构建此目标。

This property specifies the C standard whose features are requested
to build this target. For some compilers, this results in adding a
Expand Down
2 changes: 1 addition & 1 deletion Help/prop_tgt/C_STANDARD_REQUIRED.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ C_STANDARD_REQUIRED

.. versionadded:: 3.1

Boolean describing whether the value of :prop_tgt:`C_STANDARD` is a requirement.
布尔值,描述\ :prop_tgt:`C_STANDARD`\ 的值是否是必需的。

If this property is set to ``ON``, then the value of the
:prop_tgt:`C_STANDARD` target property is treated as a requirement. If this
Expand Down

0 comments on commit 35220b9

Please sign in to comment.