BUG: make the string static, otherwise the contents are gone when we exit
the function (same fix as in VTK/CMake/) Alex
This commit is contained in:
parent
ee3d940d97
commit
ec207513e4
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue