summaryrefslogtreecommitdiffstats
path: root/Modules/UseSWIG.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-02-23 17:39:23 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-02-23 17:39:23 (GMT)
commitaca1121ea6d7aca8634d07a07fe150344ce13e40 (patch)
treed99a1a4bf49178c94d63a13e3ae685b08c08e51c /Modules/UseSWIG.cmake
parente8e964f675dc2475e871a13bb5dae99ef7a40201 (diff)
downloadCMake-aca1121ea6d7aca8634d07a07fe150344ce13e40.zip
CMake-aca1121ea6d7aca8634d07a07fe150344ce13e40.tar.gz
CMake-aca1121ea6d7aca8634d07a07fe150344ce13e40.tar.bz2
UseSWIG: clean up string compares
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r--Modules/UseSWIG.cmake13
1 files changed, 5 insertions, 8 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 2a83045..ef76724 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -47,20 +47,17 @@ MACRO(SWIG_MODULE_INITIALIZE name language)
SET(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
SET(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}")
- IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$")
- MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
- ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$")
-
SET(SWIG_MODULE_${name}_REAL_NAME "${name}")
- IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$")
+ IF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN")
+ MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
+ ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON")
# when swig is used without the -interface it will produce in the module.py
# a 'import _modulename' statement, which implies having a corresponding
# _modulename.so (*NIX), _modulename.pyd (Win32).
SET(SWIG_MODULE_${name}_REAL_NAME "_${name}")
- ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$")
- IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
+ ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL")
SET(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
- ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
+ ENDIF()
ENDMACRO(SWIG_MODULE_INITIALIZE)
#