diff options
Diffstat (limited to 'cmake/Modules/GrSwig.cmake')
-rw-r--r-- | cmake/Modules/GrSwig.cmake | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake index b9bf0bb0b9..3c814c5d60 100644 --- a/cmake/Modules/GrSwig.cmake +++ b/cmake/Modules/GrSwig.cmake @@ -105,13 +105,25 @@ endfunction(GR_SWIG_MAKE_DOCS) macro(GR_SWIG_MAKE name) set(ifiles ${ARGN}) + # Shimming this in here to take care of a SWIG bug with handling + # vector<size_t> and vector<unsigned int> (on 32-bit machines) and + # vector<long unsigned int> (on 64-bit machines). Use this to test + # the size of size_t, then set SIZE_T_32 if it's a 32-bit machine + # or not if it's 64-bit. The logic in gr_type.i handles the rest. + INCLUDE (CheckTypeSize) + CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T) + CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT) + if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) + list(APPEND GR_SWIG_FLAGS -DSIZE_T_32) + endif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) + #do swig doc generation if specified if (GR_SWIG_DOC_FILE) set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS}) - set(GR_SWIG_DOCS_TARGET_DEPS ${GR_SWIG_TARGET_DEPS}) + list(APPEND GR_SWIG_DOCS_TARGET_DEPS ${GR_SWIG_TARGET_DEPS}) GR_SWIG_MAKE_DOCS(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS}) add_custom_target(${name}_swig_doc DEPENDS ${GR_SWIG_DOC_FILE}) - list(APPEND GR_SWIG_TARGET_DEPS ${name}_swig_doc) + list(APPEND GR_SWIG_TARGET_DEPS ${name}_swig_doc ${GR_RUNTIME_SWIG_DOC_FILE}) endif() #append additional include directories |