summaryrefslogtreecommitdiff
path: root/Modules/UseSWIG.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-31 13:55:22 -0500
committerBrad King <brad.king@kitware.com>2018-01-31 13:55:22 -0500
commitce130c7a6bce84a9af3859c6f58a8d6c9f16afc7 (patch)
treee5e50d0dc98e880d84031851956c1fa341d0f169 /Modules/UseSWIG.cmake
parenta0c04e71eb2eb4b06c7a4fcfd9be21f9ac6a38ad (diff)
downloadcmake-ce130c7a6bce84a9af3859c6f58a8d6c9f16afc7.tar.gz
UseSWIG: Convert docs to a bracket comment
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r--Modules/UseSWIG.cmake105
1 files changed, 53 insertions, 52 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index b8bcd92fe9..91f9cf74f2 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -1,58 +1,59 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-#.rst:
-# UseSWIG
-# -------
-#
-# Defines the following macros for use with SWIG:
-#
-# ::
-#
-# SWIG_ADD_LIBRARY(<name>
-# [TYPE <SHARED|MODULE|STATIC|USE_BUILD_SHARED_LIBS>]
-# LANGUAGE <language>
-# SOURCES <file>...
-# )
-# - Define swig module with given name and specified language
-# SWIG_LINK_LIBRARIES(name [ libraries ])
-# - Link libraries to swig module
-#
-# Source files properties on module files can be set before the invocation
-# of the SWIG_ADD_LIBRARY macro to specify special behavior of SWIG.
-#
-# The source file property CPLUSPLUS calls SWIG in c++ mode, e.g.::
-#
-# set_property(SOURCE mymod.i PROPERTY CPLUSPLUS ON)
-# swig_add_library(mymod LANGUAGE python SOURCES mymod.i)
-#
-# The source file property SWIG_FLAGS adds custom flags to the SWIG executable.
-#
-# The source-file property SWIG_MODULE_NAME have to be provided to specify the actual
-# import name of the module in the target language if it cannot be scanned automatically
-# from source or different from the module file basename.::
-#
-# set_property(SOURCE mymod.i PROPERTY SWIG_MODULE_NAME mymod_realname)
-#
-# To get the name of the swig module target library, use: ${SWIG_MODULE_${name}_REAL_NAME}.
-#
-# Also some variables can be set to specify special behavior of SWIG.
-#
-# CMAKE_SWIG_FLAGS can be used to add special flags to all swig calls.
-#
-# CMAKE_SWIG_OUTDIR allows one to specify where to write
-# the language specific files (swig -outdir option).
-#
-# SWIG_OUTFILE_DIR allows one to specify where to write the output file
-# (swig -o option). If not specified, CMAKE_SWIG_OUTDIR is used.
-#
-# The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used to specify extra
-# dependencies for the generated modules.
-#
-# If the source file generated by swig need some special flag you can use::
-#
-# set_source_files_properties( ${swig_generated_file_fullname}
-# PROPERTIES COMPILE_FLAGS "-bla")
+#[=======================================================================[.rst:
+UseSWIG
+-------
+
+Defines the following macros for use with SWIG:
+
+::
+
+ SWIG_ADD_LIBRARY(<name>
+ [TYPE <SHARED|MODULE|STATIC|USE_BUILD_SHARED_LIBS>]
+ LANGUAGE <language>
+ SOURCES <file>...
+ )
+ - Define swig module with given name and specified language
+ SWIG_LINK_LIBRARIES(name [ libraries ])
+ - Link libraries to swig module
+
+Source files properties on module files can be set before the invocation
+of the SWIG_ADD_LIBRARY macro to specify special behavior of SWIG.
+
+The source file property CPLUSPLUS calls SWIG in c++ mode, e.g.::
+
+ set_property(SOURCE mymod.i PROPERTY CPLUSPLUS ON)
+ swig_add_library(mymod LANGUAGE python SOURCES mymod.i)
+
+The source file property SWIG_FLAGS adds custom flags to the SWIG executable.
+
+The source-file property SWIG_MODULE_NAME have to be provided to specify the actual
+import name of the module in the target language if it cannot be scanned automatically
+from source or different from the module file basename.::
+
+ set_property(SOURCE mymod.i PROPERTY SWIG_MODULE_NAME mymod_realname)
+
+To get the name of the swig module target library, use: ${SWIG_MODULE_${name}_REAL_NAME}.
+
+Also some variables can be set to specify special behavior of SWIG.
+
+CMAKE_SWIG_FLAGS can be used to add special flags to all swig calls.
+
+CMAKE_SWIG_OUTDIR allows one to specify where to write
+the language specific files (swig -outdir option).
+
+SWIG_OUTFILE_DIR allows one to specify where to write the output file
+(swig -o option). If not specified, CMAKE_SWIG_OUTDIR is used.
+
+The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used to specify extra
+dependencies for the generated modules.
+
+If the source file generated by swig need some special flag you can use::
+
+ set_source_files_properties( ${swig_generated_file_fullname}
+ PROPERTIES COMPILE_FLAGS "-bla")
+#]=======================================================================]
set(SWIG_CXX_EXTENSION "cxx")
set(SWIG_EXTRA_LIBRARIES "")