summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-06-28 15:14:40 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-06-28 15:14:40 (GMT)
commitd392ccaee563a7f757eae72d9b32ea258e846a7c (patch)
tree35081b302a50e82498a6c4f33542a3e22ae2f9f2 /Modules
parent0beaf4cb4e5728756e6bee2d19c5821c3b06b216 (diff)
downloadCMake-d392ccaee563a7f757eae72d9b32ea258e846a7c.zip
CMake-d392ccaee563a7f757eae72d9b32ea258e846a7c.tar.gz
CMake-d392ccaee563a7f757eae72d9b32ea258e846a7c.tar.bz2
BUG: Add more comments and fix CMAKE_SWIG_FLAGS
Diffstat (limited to 'Modules')
-rw-r--r--Modules/UseSWIG.cmake21
1 files changed, 20 insertions, 1 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 652cac6..0b67761 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -1,3 +1,21 @@
+#
+# SWIG module for CMake
+#
+# Defines the following macros:
+#
+# SWIG_ADD_MODULE(name language [ files ])
+# - Define swig module with given name and specified language
+#
+# SWIG_LINK_LIBRARIES(name [ libraries ])
+# - Link libraries to swig module
+#
+# All other macros are for internal use only.
+#
+# To get the actual name of the swig module, use: ${SWIG_MODULE_name_REAL_NAME}.
+# Set Source files propertis such as CPLUSPLUS and SWIG_FLAGS to specify
+# special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add
+# special flags to all swig calls.
+
SET(SWIG_CXX_EXTENSION "cxx")
SET(SWIG_EXTRA_LIBRARIES "")
@@ -27,7 +45,7 @@ ENDMACRO(SWIG_MODULE_INITIALIZE)
#
# For a given language, input file, and output file, determine extra files that
-# will be generated
+# will be generated. This is internal swig macro.
#
MACRO(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
@@ -116,6 +134,7 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
COMMAND "${SWIG_EXECUTABLE}"
ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}"
${swig_source_file_flags}
+ ${CMAKE_SWIG_FLAGS}
${swig_special_flags}
${swig_extra_flags}
${swig_include_dirs}