mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 04:37:56 +00:00
Work around https://github.com/swig/swig/issues/325
This commit is contained in:
@@ -41,6 +41,12 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
|
|||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
SET(CMAKE_SWIG_FLAGS "")
|
SET(CMAKE_SWIG_FLAGS "")
|
||||||
|
# NOTE Workaround for most likely missing debug Python libraries on Windows (requires Python built from the source).
|
||||||
|
# Python 3.5 intaller and onwards will have an option to install the debug libraries too.
|
||||||
|
IF (WIN32 AND NOT PYTHON_DEBUG_LIBRARIES)
|
||||||
|
MESSAGE(STATUS "PYTHON_DEBUG_LIBRARIES not found, defining SWIG_PYTHON_INTERPRETER_NO_DEBUG workaround for IfcWrap.")
|
||||||
|
ADD_DEFINITIONS(-DSWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(IfcPython.i PROPERTIES CPLUSPLUS ON)
|
SET_SOURCE_FILES_PROPERTIES(IfcPython.i PROPERTIES CPLUSPLUS ON)
|
||||||
SWIG_ADD_MODULE(ifcopenshell_wrapper python IfcPython.i)
|
SWIG_ADD_MODULE(ifcopenshell_wrapper python IfcPython.i)
|
||||||
|
|||||||
@@ -17,6 +17,27 @@
|
|||||||
* *
|
* *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
%begin %{
|
||||||
|
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
||||||
|
/* https://github.com/swig/swig/issues/325 */
|
||||||
|
# include <basetsd.h>
|
||||||
|
# include <assert.h>
|
||||||
|
# include <ctype.h>
|
||||||
|
# include <errno.h>
|
||||||
|
# include <io.h>
|
||||||
|
# include <math.h>
|
||||||
|
# include <sal.h>
|
||||||
|
# include <stdarg.h>
|
||||||
|
# include <stddef.h>
|
||||||
|
# include <stdio.h>
|
||||||
|
# include <stdlib.h>
|
||||||
|
# include <string.h>
|
||||||
|
# include <sys/stat.h>
|
||||||
|
# include <time.h>
|
||||||
|
# include <wchar.h>
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
||||||
%include "std_string.i"
|
%include "std_string.i"
|
||||||
%include "exception.i"
|
%include "exception.i"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user