Commit 52708d7f authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Get utils building in python.

parent ce93f592
......@@ -60,7 +60,7 @@ if(XDMF_WRAP_PYTHON)
# Target Name = the output target name will have ${python_name} as its name
macro(XDMF_SWIG_PYTHON python_name)
set(CMAKE_SWIG_OUTDIR ${CMAKE_BINARY_DIR})
set(CMAKE_SWIG_FLAGS "")
set(CMAKE_SWIG_FLAGS ${XDMF_SWIG_FLAGS})
set_source_files_properties(${python_name}.i PROPERTIES CPLUSPLUS ON)
set(swig_extra_generated_files "")
swig_add_module(${python_name} python ${python_name}.i)
......@@ -121,7 +121,7 @@ if(XDMF_WRAP_JAVA)
set(XDMF_JAVA_PACKAGE_DIR mil/army/arl/xdmf)
set(XDMF_JAVA_DIR ${CMAKE_CURRENT_BINARY_DIR}/${XDMF_JAVA_PACKAGE_DIR})
set(CMAKE_SWIG_OUTDIR ${XDMF_JAVA_DIR})
set(CMAKE_SWIG_FLAGS -v -make_default -package mil.army.arl.xdmf)
set(CMAKE_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -v -make_default -package mil.army.arl.xdmf)
set_source_files_properties(${java_name}.i PROPERTIES CPLUSPLUS ON)
set(swig_extra_generated_files "")
swig_add_module(${java_name}Java java ${java_name}.i)
......
......@@ -8,7 +8,7 @@ set(XdmfUtilsSources
set(XdmfUtilsLinkLibraries Xdmf)
if(XDMF_BUILD_EXODUS_IO)
set(XdmfSwigFlags ${XdmfSwigFlags} "-DXDMF_BUILD_EXODUS_IO ")
set(XDMF_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -DXDMF_BUILD_EXODUS_IO)
find_package(Exodus REQUIRED)
if(EXODUS_FOUND)
include_directories(${EXODUS_INCLUDE_DIR} ${NetCDF_INCLUDE_DIR})
......@@ -21,7 +21,7 @@ if(XDMF_BUILD_EXODUS_IO)
endif(XDMF_BUILD_EXODUS_IO)
if(XDMF_BUILD_PARTITIONER)
set(XdmfSwigFlags ${XdmfSwigFlags} "-DXDMF_BUILD_PARTITIONER ")
set(XDMF_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -DXDMF_BUILD_PARTITIONER)
find_package(Metis REQUIRED)
if(METIS_FOUND)
include_directories(${METIS_INCLUDE_DIR})
......@@ -49,6 +49,10 @@ if(XDMF_WRAP_JAVA)
set(XDMF_UTILS_JAVA_JAR ${CMAKE_BINARY_DIR}/XdmfUtils.jar CACHE INTERNAL "")
endif(XDMF_WRAP_JAVA)
if(XDMF_WRAP_PYTHON)
XDMF_SWIG_PYTHON(XdmfUtils Xdmf)
endif(XDMF_WRAP_PYTHON)
foreach(source ${XdmfUtilsSources})
set(XdmfUtilsHeaders ${XdmfUtilsHeaders} ${source}.hpp)
endforeach(source ${XdmfUtilsSources})
......
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