Commit ad9f35e4 authored by David Gobbi's avatar David Gobbi Committed by Marcus D. Hanwell

BUG: wrapper generators were failing if hints file was not set

parent d0712231
......@@ -72,6 +72,12 @@ MACRO(VTK_WRAP_PYTHON3 TARGET SRC_LIST_NAME SOURCES)
SET(TMP_SPECIAL "--vtkobject")
ENDIF (TMP_WRAP_SPECIAL)
IF (VTK_WRAP_HINTS)
SET(TMP_HINTS "--hints" "${quote}${VTK_WRAP_HINTS}${quote}")
ELSE (VTK_WRAP_HINTS)
SET(TMP_HINTS)
ENDIF (VTK_WRAP_HINTS)
# add the info to the init file
SET(VTK_WRAPPER_INIT_DATA
"${VTK_WRAPPER_INIT_DATA}\n${TMP_FILENAME}")
......@@ -88,7 +94,7 @@ MACRO(VTK_WRAP_PYTHON3 TARGET SRC_LIST_NAME SOURCES)
ARGS
${TMP_CONCRETE}
${TMP_SPECIAL}
"--hints" "${quote}${VTK_WRAP_HINTS}${quote}"
${TMP_HINTS}
"${quote}${TMP_INPUT}${quote}"
"${quote}${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}Python.cxx${quote}"
COMMENT "Python Wrapping - generating ${TMP_FILENAME}Python.cxx"
......
......@@ -5999,10 +5999,13 @@ int main(int argc, char *argv[])
data.IsConcrete = atoi(argv[argi++]);
}
if (!(fhint = fopen(hintFileName, "r")))
if (hintFileName && hintFileName[0] != '\0')
{
fprintf(stderr, "Error opening hint file %s\n", hintFileName);
exit(1);
if (!(fhint = fopen(hintFileName, "r")))
{
fprintf(stderr, "Error opening hint file %s\n", hintFileName);
exit(1);
}
}
yyin = fin;
......
......@@ -2075,10 +2075,13 @@ int main(int argc, char *argv[])
data.IsConcrete = atoi(argv[argi++]);
}
if (!(fhint = fopen(hintFileName, "r")))
if (hintFileName && hintFileName[0] != '\0')
{
fprintf(stderr, "Error opening hint file %s\n", hintFileName);
exit(1);
if (!(fhint = fopen(hintFileName, "r")))
{
fprintf(stderr, "Error opening hint file %s\n", hintFileName);
exit(1);
}
}
yyin = fin;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment