Merge branch 'UseSWIG-fix-CMP0054-warnings' into release

This commit is contained in:
Brad King 2015-03-09 16:38:49 -04:00
commit 0fe4cce22f
1 changed files with 4 additions and 4 deletions

View File

@ -76,16 +76,16 @@ macro(SWIG_MODULE_INITIALIZE name language)
if (";${CMAKE_SWIG_FLAGS};" MATCHES ";-noproxy;") if (";${CMAKE_SWIG_FLAGS};" MATCHES ";-noproxy;")
set (SWIG_MODULE_${name}_NOPROXY TRUE) set (SWIG_MODULE_${name}_NOPROXY TRUE)
endif () endif ()
if("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN") if("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xUNKNOWN")
message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found") message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON" AND NOT SWIG_MODULE_${name}_NOPROXY) elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xPYTHON" AND NOT SWIG_MODULE_${name}_NOPROXY)
# swig will produce a module.py containing an 'import _modulename' statement, # swig will produce a module.py containing an 'import _modulename' statement,
# which implies having a corresponding _modulename.so (*NIX), _modulename.pyd (Win32), # which implies having a corresponding _modulename.so (*NIX), _modulename.pyd (Win32),
# unless the -noproxy flag is used # unless the -noproxy flag is used
set(SWIG_MODULE_${name}_REAL_NAME "_${name}") set(SWIG_MODULE_${name}_REAL_NAME "_${name}")
elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL") elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xPERL")
set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow") set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "CSHARP") elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xCSHARP")
# This makes sure that the name used in the generated DllImport # This makes sure that the name used in the generated DllImport
# matches the library name created by CMake # matches the library name created by CMake
set(SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport;${name}") set(SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport;${name}")