summaryrefslogtreecommitdiffstats
path: root/Modules/FindPythonLibs.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-09-18 19:13:22 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-09-18 19:13:22 (GMT)
commitec207513e4bfc1c3336850ed9cab8fdd7394fa76 (patch)
treece02f946d46a5ed5860e17ae01d8d94f3279f202 /Modules/FindPythonLibs.cmake
parentee3d940d97ca4c59ba75551c34a78143e3645f84 (diff)
downloadCMake-ec207513e4bfc1c3336850ed9cab8fdd7394fa76.zip
CMake-ec207513e4bfc1c3336850ed9cab8fdd7394fa76.tar.gz
CMake-ec207513e4bfc1c3336850ed9cab8fdd7394fa76.tar.bz2
BUG: make the string static, otherwise the contents are gone when we exit
the function (same fix as in VTK/CMake/) Alex
Diffstat (limited to 'Modules/FindPythonLibs.cmake')
-rw-r--r--Modules/FindPythonLibs.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index a9cf89e..8e60c0d 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -145,7 +145,7 @@ extern \"C\" {
FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
+ FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n")