1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

ISPC: Update help documentation to include ISPC

This commit is contained in:
Robert Maynard
2020-07-30 10:15:22 -04:00
parent 2368f46ba4
commit 8976817d6d
9 changed files with 62 additions and 5 deletions

View File

@@ -9,7 +9,8 @@ Enable a language (CXX/C/OBJC/OBJCXX/Fortran/etc)
Enables support for the named language in CMake. This is
the same as the :command:`project` command but does not create any of the extra
variables that are created by the project command. Example languages
are ``CXX``, ``C``, ``CUDA``, ``OBJC``, ``OBJCXX``, ``Fortran``, and ``ASM``.
are ``CXX``, ``C``, ``CUDA``, ``OBJC``, ``OBJCXX``, ``Fortran``,
``ISPC``, and ``ASM``.
If enabling ``ASM``, enable it last so that CMake can check whether
compilers for other languages like ``C`` work for assembly too.

View File

@@ -88,7 +88,7 @@ The options are:
Selects which programming languages are needed to build the project.
Supported languages include ``C``, ``CXX`` (i.e. C++), ``CUDA``,
``OBJC`` (i.e. Objective-C), ``OBJCXX``, ``Fortran``, and ``ASM``.
``OBJC`` (i.e. Objective-C), ``OBJCXX``, ``Fortran``, ``ISPC``, and ``ASM``.
By default ``C`` and ``CXX`` are enabled if no language options are given.
Specify language ``NONE``, or use the ``LANGUAGES`` keyword and list no languages,
to skip enabling any languages.

13
Help/envvar/ISPC.rst Normal file
View File

@@ -0,0 +1,13 @@
ISPC
-------
.. versionadded:: 3.19
.. include:: ENV_VAR.txt
Preferred executable for compiling ``ISPC`` language files. Will only be used by
CMake on the first configuration to determine ``ISPC`` compiler, after which the
value for ``ISPC`` is stored in the cache as
:variable:`CMAKE_ISPC_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration
run (including the first), the environment variable will be ignored if the
:variable:`CMAKE_ISPC_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.

15
Help/envvar/ISPCFLAGS.rst Normal file
View File

@@ -0,0 +1,15 @@
ISPCFLAGS
---------
.. versionadded:: 3.19
.. include:: ENV_VAR.txt
Default compilation flags to be used when compiling ``ISPC`` files. Will only be
used by CMake on the first configuration to determine ``ISPC`` default
compilation flags, after which the value for ``ISPCFLAGS`` is stored in the
cache as :variable:`CMAKE_ISPC_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
run (including the first), the environment variable will be ignored if
the :variable:`CMAKE_ISPC_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
See also :variable:`CMAKE_ISPC_FLAGS_INIT <CMAKE_<LANG>_FLAGS_INIT>`.

View File

@@ -63,6 +63,8 @@ Environment Variables for Languages
/envvar/CXXFLAGS
/envvar/FC
/envvar/FFLAGS
/envvar/ISPC
/envvar/ISPCFLAGS
/envvar/OBJC
/envvar/OBJCXX
/envvar/RC

View File

@@ -146,6 +146,11 @@ Variable Queries
``1`` if the CMake's compiler id of the Fortran compiler matches any one
of the entries in ``compiler_ids``, otherwise ``0``.
See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable.
``$<ISPC_COMPILER_ID:compiler_ids>``
where ``compiler_ids`` is a comma-separated list.
``1`` if the CMake's compiler id of the ISPC compiler matches any one
of the entries in ``compiler_ids``, otherwise ``0``.
See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable.
``$<C_COMPILER_VERSION:version>``
``1`` if the version of the C compiler matches ``version``, otherwise ``0``.
See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable.
@@ -164,6 +169,9 @@ Variable Queries
``$<Fortran_COMPILER_VERSION:version>``
``1`` if the version of the Fortran compiler matches ``version``, otherwise ``0``.
See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable.
``$<ISPC_COMPILER_VERSION:version>``
``1`` if the version of the ISPC compiler matches ``version``, otherwise ``0``.
See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable.
``$<TARGET_POLICY:policy>``
``1`` if the ``policy`` was NEW when the 'head' target was created,
else ``0``. If the ``policy`` was not set, the warning message for the policy
@@ -543,6 +551,9 @@ Variable Queries
``$<Fortran_COMPILER_ID>``
The CMake's compiler id of the Fortran compiler used.
See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable.
``$<ISPC_COMPILER_ID>``
The CMake's compiler id of the ISPC compiler used.
See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable.
``$<C_COMPILER_VERSION>``
The version of the C compiler used.
See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable.
@@ -561,6 +572,9 @@ Variable Queries
``$<Fortran_COMPILER_VERSION>``
The version of the Fortran compiler used.
See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable.
``$<ISPC_COMPILER_VERSION>``
The version of the ISPC compiler used.
See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable.
``$<COMPILE_LANGUAGE>``
The compile language of source files when evaluating compile options.
See :ref:`the related boolean expression

View File

@@ -6,6 +6,6 @@ What programming language is the file.
A property that can be set to indicate what programming language the
source file is. If it is not set the language is determined based on
the file extension. Typical values are ``CXX`` (i.e. C++), ``C``,
``CSharp``, ``CUDA``, ``Fortran``, and ``ASM``. Setting this
``CSharp``, ``CUDA``, ``Fortran``, ``ISPC``, and ``ASM``. Setting this
property for a file means this file will be compiled. Do not set this
for headers or files that should not be compiled.

View File

@@ -3,10 +3,11 @@ ISPC_HEADER_DIRECTORY
.. versionadded:: 3.19
Specify output directory for ISPC headers provided by the target.
Specify relative output directory for ISPC headers provided by the target.
If the target contains ISPC source files, this specifies the directory in which
the generated headers will be placed. When this property is not set, the
the generated headers will be placed. Relative paths are treated with respect to
the value of :variable:`CMAKE_CURRENT_BINARY_DIR`. When this property is not set, the
headers will be placed a generator defined build directory. If the variable
:variable:`CMAKE_ISPC_HEADER_DIRECTORY` is set when a target is created
its value is used to initialize this property.

View File

@@ -0,0 +1,11 @@
cmake-ispc-support
------------------
* CMake learned to support ``ISPC`` as a first-class language that can be
enabled via the :command:`project` and :command:`enable_language` commands.
* ``ISPC`` is currently supported by the :ref:`Makefile Generators`
and the :generator:`Ninja` generator on Linux, macOS, and Windows.
* The Intel ISPC compiler (``ispc``) is supported.