Commit d745551f authored by Saleem Abdulrasool's avatar Saleem Abdulrasool Committed by Brad King

Help: add some initial documentation for Swift support

parent 9a182c9e
SWIFTC
------
.. include:: ENV_VAR.txt
Preferred executable for compiling ``Swift`` language files. Will only be used by
CMake on the first configuration to determine ``Swift`` compiler, after which the
value for ``SWIFTC`` is stored in the cache as
:variable:`CMAKE_Swift_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration run
(including the first), the environment variable will be ignored if the
:variable:`CMAKE_Swift_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
......@@ -52,6 +52,7 @@ Environment Variables for Languages
/envvar/FFLAGS
/envvar/RC
/envvar/RCFLAGS
/envvar/SWIFTC
Environment Variables for CTest
===============================
......
......@@ -315,6 +315,9 @@ Properties on Targets
/prop_tgt/STATIC_LIBRARY_FLAGS
/prop_tgt/STATIC_LIBRARY_OPTIONS
/prop_tgt/SUFFIX
/prop_tgt/Swift_DEPENDENCIES_FILE
/prop_tgt/Swift_MODULE_DIRECTORY
/prop_tgt/Swift_MODULE_NAME
/prop_tgt/TYPE
/prop_tgt/VERSION
/prop_tgt/VISIBILITY_INLINES_HIDDEN
......@@ -439,6 +442,8 @@ Properties on Source Files
/prop_sf/SKIP_AUTOMOC
/prop_sf/SKIP_AUTORCC
/prop_sf/SKIP_AUTOUIC
/prop_sf/Swift_DEPENDENCIES_FILE
/prop_sf/Swift_DIAGNOSTICS_FILE
/prop_sf/SYMBOLIC
/prop_sf/VS_COPY_TO_OUT_DIR
/prop_sf/VS_CSHARP_tagname
......
......@@ -97,6 +97,7 @@ Variables that Provide Information
/variable/CMAKE_SOURCE_DIR
/variable/CMAKE_STATIC_LIBRARY_PREFIX
/variable/CMAKE_STATIC_LIBRARY_SUFFIX
/variable/CMAKE_Swift_MODULE_DIRECTORY
/variable/CMAKE_TOOLCHAIN_FILE
/variable/CMAKE_TWEAK_VERSION
/variable/CMAKE_VERBOSE_MAKEFILE
......
Swift_DEPENDENCIES_FILE
-----------------------
This property sets the path for the Swift dependency file (swiftdeps) for the
source.
Swift_DIAGNOSTICS_FILE
----------------------
This property controls where the Swift diagnostics are serialized.
Swift_DEPENDENCIES_FILE
-----------------------
This property sets the path for the Swift dependency file (swiftdep) for the
target.
Swift_MODULE_DIRECTORY
----------------------
Specify output directory for Swift modules provided by the target.
If the target contains Swift source files, this specifies the directory in which
the modules will be placed. When this property is not set, the modules will be
placed in the build directory corresponding to the target's source directory.
If the variable :variable:`CMAKE_Swift_MODULE_DIRECTORY` is set when a target is
created its value is used to initialise this property.
Swift_MODULE_NAME
-----------------
This property specifies the name of the Swift module. It is defaulted to the
name of the target.
Swift Language Support
----------------------
* Preliminary support for the Swift language with the :generator:`Ninja`
generator was added. Use the :envvar:`SWIFTC` environment variable to
specify a compiler.
* Support to emit an output file map was added to enable Swift compilation.
* A target property :prop_tgt:`Swift_DEPENDENCIES_FILE` was added to targets to
indicate where to save the target swift dependencies file. If one is not
specified, it will default to `<TARGET>.swiftdeps`.
* A target property :prop_tgt:`Swift_MODULE_NAME` was added to targets to
indicate the Swift module name. If it is not specified, it will default to
the name of the target.
* A source property :prop_sf:`Swift_DEPENDENCIES_FILE` was added to sources to
indicate where to save the target swift dependencies file. If one is not
specified, it will default to `<OBJECT>.swiftdeps`.
* A source property :prop_sf:`Swift_DIAGNOSTICS_FILE` was added to sources to
indicate where to write the serialised Swift diagnostics.
CMAKE_Swift_MODULE_DIRECTORY
----------------------------
Swift module output directory.
This variable is used to initialise the :prop_tgt:`Swift_MODULE_DIRECTORY`
property on all the targets. See the target property for additional
information.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment