Prechádzať zdrojové kódy

Workaround to fix HAVE_STAT redefined warning related to DICOM module wrapping

This commit fixes the following warnings:

//------------
In file included from /path/to/DCMTK/dcmdata/include/dcmtk/dcmdata/dcdatset.h:26,
                 from /path/to/CTK/Libs/DICOM/Core/ctkDICOMItem.h:28,
                 from /path/to/CTK/Libs/DICOM/Core/ctkDICOMDatabase.h:29,
                 from /path/to/CTK-build/CTK-build/Libs/DICOM/Core/generated_cpp/org_commontk_CTKDICOMCore/org_commontk_CTKDICOMCore.h:10,
                 from /path/to/CTK-build/CTK-build/Libs/DICOM/Core/generated_cpp/org_commontk_CTKDICOMCore/org_commontk_CTKDICOMCore_init.cpp:7:
/path/to/DCMTK-build/config/include/dcmtk/config/osconfig.h:540:1: warning: "HAVE_STAT" redefined
In file included from /path/to/python-install/include/python2.7/Python.h:58,
                 from /path/to/CTK-build/CMakeExternals/Install/include/PythonQt/PythonQtPythonInclude.h:93,
                 from /path/to/CTK-build/CMakeExternals/Install/include/PythonQt/PythonQtInstanceWrapper.h:45,
                 from /path/to/CTK-build/CMakeExternals/Install/include/PythonQt/PythonQt.h:46,
                 from /path/to/CTK-build/CTK-build/Libs/DICOM/Core/generated_cpp/org_commontk_CTKDICOMCore/org_commontk_CTKDICOMCore_init.cpp:6:
/path/to/python-install/include/python2.7/pyport.h:361:1: warning: this is the location of the previous definition
//------------

and

//------------
In file included from /path/to/DCMTK/dcmdata/include/dcmtk/dcmdata/dcdatset.h:26,
                 from /path/to/CTK/Libs/DICOM/Core/ctkDICOMItem.h:28,
                 from /path/to/CTK/Libs/DICOM/Core/ctkDICOMDatabase.h:29,
                 from /path/to/CTK/Libs/DICOM/Widgets/ctkDICOMDirectoryListWidget.h:30,
                 from /path/to/CTK-build/CTK-build/Libs/DICOM/Widgets/generated_cpp/org_commontk_CTKDICOMWidgets/org_commontk_CTKDICOMWidgets.h:12,
                 from /path/to/CTK-build/CTK-build/Libs/DICOM/Widgets/generated_cpp/org_commontk_CTKDICOMWidgets/org_commontk_CTKDICOMWidgets_init.cpp:7:
/path/to/DCMTK-build/config/include/dcmtk/config/osconfig.h:540:1: warning: "HAVE_STAT" redefined
In file included from /path/to/python-install/include/python2.7/Python.h:58,
                 from /path/to/CTK-build/CMakeExternals/Install/include/PythonQt/PythonQtPythonInclude.h:93,
                 from /path/to/CTK-build/CMakeExternals/Install/include/PythonQt/PythonQtInstanceWrapper.h:45,
                 from /path/to/CTK-build/CMakeExternals/Install/include/PythonQt/PythonQt.h:46,
                 from /path/to/CTK-build/CTK-build/Libs/DICOM/Widgets/generated_cpp/org_commontk_CTKDICOMWidgets/org_commontk_CTKDICOMWidgets_init.cpp:6:
/path/to/python-install/include/python2.7/pyport.h:361:1: warning: this is the location of the previous definition
//------------
Jean-Christophe Fillion-Robin 10 rokov pred
rodič
commit
09c25807e9
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      CMake/ctkWrapPythonQt.py

+ 2 - 0
CMake/ctkWrapPythonQt.py

@@ -186,6 +186,8 @@ ${pythonqtWrappers}
 //
 
 #include <PythonQt.h>
+// XXX Avoid  warning: "HAVE_STAT" redefined
+#undef HAVE_STAT
 #include "${namespace}_${target}.h"
 
 void PythonQt_init_${namespace}_${target}(PyObject* module)