From 8976817d6d4cf8ba5755ab24e2760c4c9cb485de Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 30 Jul 2020 10:15:22 -0400 Subject: ISPC: Update help documentation to include ISPC --- Help/command/enable_language.rst | 3 ++- Help/command/project.rst | 2 +- Help/envvar/ISPC.rst | 13 +++++++++++++ Help/envvar/ISPCFLAGS.rst | 15 +++++++++++++++ Help/manual/cmake-env-variables.7.rst | 2 ++ Help/manual/cmake-generator-expressions.7.rst | 14 ++++++++++++++ Help/prop_sf/LANGUAGE.rst | 2 +- Help/prop_tgt/ISPC_HEADER_DIRECTORY.rst | 5 +++-- Help/release/dev/ispc-language-support.rst | 11 +++++++++++ 9 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 Help/envvar/ISPC.rst create mode 100644 Help/envvar/ISPCFLAGS.rst create mode 100644 Help/release/dev/ispc-language-support.rst diff --git a/Help/command/enable_language.rst b/Help/command/enable_language.rst index fdc44f2..e8640ea 100644 --- a/Help/command/enable_language.rst +++ b/Help/command/enable_language.rst @@ -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. diff --git a/Help/command/project.rst b/Help/command/project.rst index b6093d3..c325050 100644 --- a/Help/command/project.rst +++ b/Help/command/project.rst @@ -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. diff --git a/Help/envvar/ISPC.rst b/Help/envvar/ISPC.rst new file mode 100644 index 0000000..bcd6260 --- /dev/null +++ b/Help/envvar/ISPC.rst @@ -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 _COMPILER>`. For any configuration +run (including the first), the environment variable will be ignored if the +:variable:`CMAKE_ISPC_COMPILER _COMPILER>` variable is defined. diff --git a/Help/envvar/ISPCFLAGS.rst b/Help/envvar/ISPCFLAGS.rst new file mode 100644 index 0000000..21df037 --- /dev/null +++ b/Help/envvar/ISPCFLAGS.rst @@ -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 _FLAGS>`. For any configuration +run (including the first), the environment variable will be ignored if +the :variable:`CMAKE_ISPC_FLAGS _FLAGS>` variable is defined. + +See also :variable:`CMAKE_ISPC_FLAGS_INIT _FLAGS_INIT>`. diff --git a/Help/manual/cmake-env-variables.7.rst b/Help/manual/cmake-env-variables.7.rst index ce1e360..13e0d39 100644 --- a/Help/manual/cmake-env-variables.7.rst +++ b/Help/manual/cmake-env-variables.7.rst @@ -63,6 +63,8 @@ Environment Variables for Languages /envvar/CXXFLAGS /envvar/FC /envvar/FFLAGS + /envvar/ISPC + /envvar/ISPCFLAGS /envvar/OBJC /envvar/OBJCXX /envvar/RC diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index c7f6b27..b9c238d 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -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__COMPILER_ID` variable. +``$`` + 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__COMPILER_ID` variable. ``$`` ``1`` if the version of the C compiler matches ``version``, otherwise ``0``. See also the :variable:`CMAKE__COMPILER_VERSION` variable. @@ -164,6 +169,9 @@ Variable Queries ``$`` ``1`` if the version of the Fortran compiler matches ``version``, otherwise ``0``. See also the :variable:`CMAKE__COMPILER_VERSION` variable. +``$`` + ``1`` if the version of the ISPC compiler matches ``version``, otherwise ``0``. + See also the :variable:`CMAKE__COMPILER_VERSION` variable. ``$`` ``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 ``$`` The CMake's compiler id of the Fortran compiler used. See also the :variable:`CMAKE__COMPILER_ID` variable. +``$`` + The CMake's compiler id of the ISPC compiler used. + See also the :variable:`CMAKE__COMPILER_ID` variable. ``$`` The version of the C compiler used. See also the :variable:`CMAKE__COMPILER_VERSION` variable. @@ -561,6 +572,9 @@ Variable Queries ``$`` The version of the Fortran compiler used. See also the :variable:`CMAKE__COMPILER_VERSION` variable. +``$`` + The version of the ISPC compiler used. + See also the :variable:`CMAKE__COMPILER_VERSION` variable. ``$`` The compile language of source files when evaluating compile options. See :ref:`the related boolean expression diff --git a/Help/prop_sf/LANGUAGE.rst b/Help/prop_sf/LANGUAGE.rst index 88d438e..1dd2554 100644 --- a/Help/prop_sf/LANGUAGE.rst +++ b/Help/prop_sf/LANGUAGE.rst @@ -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. diff --git a/Help/prop_tgt/ISPC_HEADER_DIRECTORY.rst b/Help/prop_tgt/ISPC_HEADER_DIRECTORY.rst index 61b63fb..2a3a8bc 100644 --- a/Help/prop_tgt/ISPC_HEADER_DIRECTORY.rst +++ b/Help/prop_tgt/ISPC_HEADER_DIRECTORY.rst @@ -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. diff --git a/Help/release/dev/ispc-language-support.rst b/Help/release/dev/ispc-language-support.rst new file mode 100644 index 0000000..254442e --- /dev/null +++ b/Help/release/dev/ispc-language-support.rst @@ -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. -- cgit v0.12