diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-09-18 19:13:22 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-09-18 19:13:22 (GMT) |
commit | ec207513e4bfc1c3336850ed9cab8fdd7394fa76 (patch) | |
tree | ce02f946d46a5ed5860e17ae01d8d94f3279f202 | |
parent | ee3d940d97ca4c59ba75551c34a78143e3645f84 (diff) | |
download | CMake-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
-rw-r--r-- | Modules/FindPythonLibs.cmake | 2 |
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") |