From ec207513e4bfc1c3336850ed9cab8fdd7394fa76 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 18 Sep 2007 15:13:22 -0400 Subject: BUG: make the string static, otherwise the contents are gone when we exit the function (same fix as in VTK/CMake/) Alex --- Modules/FindPythonLibs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit v0.12