Commit 6711cceb authored by T.J. Corona's avatar T.J. Corona
Browse files

Updates to keep up with latest SMTK API

parent b93883f5
......@@ -92,7 +92,7 @@ string(REPLACE "-" "_" safe_project_name "${PROJECT_NAME}")
# Build the plugin containing the File menu items
paraview_plugin_scan(
PLUGIN_FILES plugin/paraview.plugin
PLUGIN_FILES smtk/mesh/adh/plugin/paraview.plugin
PROVIDES_PLUGINS paraview_plugins
ENABLE_BY_DEFAULT ON
HIDE_PLUGINS_FROM_CACHE ON)
......@@ -107,16 +107,6 @@ paraview_plugin_build(
ADD_INSTALL_RPATHS ON
TARGET ${safe_project_name}_paraview_plugins)
#-----------------------------------------------------------------------------
# Plugin tests
option(ENABLE_TESTING "Enable Testing" OFF)
if (ENABLE_TESTING)
enable_testing()
include(TestingMacros)
add_subdirectory(testing)
endif()
export(
EXPORT ${PROJECT_NAME}
FILE "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/${PROJECT_NAME}-targets.cmake")
......
......@@ -51,19 +51,3 @@ smtk_operation_xml("${CMAKE_CURRENT_SOURCE_DIR}/operators/GenerateHotStartData.s
adhOperatorXML)
add_subdirectory(pybind11)
paraview_plugin_scan(
PLUGIN_FILES plugin/paraview.plugin
PROVIDES_PLUGINS paraview_plugins
ENABLE_BY_DEFAULT ON
HIDE_PLUGINS_FROM_CACHE ON)
paraview_plugin_build(
HEADERS_DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${PROJECT_VERSION}"
LIBRARY_SUBDIRECTORY "smtk-${smtk_VERSION}"
PLUGINS ${paraview_plugins}
PLUGINS_FILE_NAME "smtk.adh.xml"
AUTOLOAD ${paraview_plugins}
INSTALL_EXPORT ADHExtensionPlugin
CMAKE_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
ADD_INSTALL_RPATHS ON
TARGET adh_paraview_plugins)
set(library_name "_smtkPybindADHMesh")
set(module_path "smtkmeshadh")
set(build_path "${CMAKE_BINARY_DIR}/${PYTHON_MODULEDIR}/${module_path}")
set(build_path "${PROJECT_BINARY_DIR}/${module_path}")
set(install_path "${PYTHON_MODULEDIR}/${module_path}")
pybind11_add_module(${library_name} PybindADHMesh.cxx)
......
......@@ -62,19 +62,19 @@ foreach(pyxmlfile ${operatorsPyXML})
get_filename_component(filename ${pyxmlfile} NAME)
configure_file(
"${pyxmlfile}"
"${CMAKE_BINARY_DIR}/${PYTHON_MODULEDIR}/smtksimulationadh/${filename}"
"${PROJECT_BINARY_DIR}/smtksimulationadh/${filename}"
COPYONLY)
list(APPEND adh_pymodulefiles "${CMAKE_BINARY_DIR}/${PYTHON_MODULEDIR}/smtksimulationadh/${filename}")
list(APPEND adh_pymodulefiles "${PROJECT_BINARY_DIR}/smtksimulationadh/${filename}")
endforeach()
foreach(pyfile ${adhPySrcs})
get_filename_component(filename ${pyfile} NAME)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/${pyfile}"
"${CMAKE_BINARY_DIR}/${PYTHON_MODULEDIR}/smtksimulationadh/${filename}"
"${PROJECT_BINARY_DIR}/smtksimulationadh/${filename}"
COPYONLY
)
list(APPEND adh_pymodulefiles "${CMAKE_BINARY_DIR}/${PYTHON_MODULEDIR}/smtksimulationadh/${filename}")
list(APPEND adh_pymodulefiles "${PROJECT_BINARY_DIR}/smtksimulationadh/${filename}")
endforeach()
install(
FILES ${adh_pymodulefiles}
......
......@@ -230,7 +230,7 @@ def init_scope(spec):
bc_face_groups = {}
for bc_att in bc_att_list:
#ignore any bcs that aren't part of the categories being exported
if not bc_att.isMemberOf(scope.categories):
if not bc_att.categories().passes(set(scope.categories)):
continue
#Get the list of associated model entities
......@@ -459,7 +459,7 @@ def write_items(scope, att, format_list):
continue
# Check that item is in an enabled category
if not item.isMemberOf(scope.categories):
if not item.categories().passes(set(scope.categories)):
continue
if item is None:
......
set(library_name "_smtkPybindADHSimulation")
set(module_path "smtksimulationadh")
set(build_path "${CMAKE_BINARY_DIR}/${PYTHON_MODULEDIR}/${module_path}")
set(build_path "${PROJECT_BINARY_DIR}/${module_path}")
set(install_path "${PYTHON_MODULEDIR}/${module_path}")
pybind11_add_module(${library_name} PybindADHSimulation.cxx)
......
......@@ -3,7 +3,7 @@ set(smtkAdHExportTests
test_tagging
)
set(smtk_module_dir ${smtk_DIR}/${SMTK_PYTHON_MODULEDIR})
set(smtk_module_dir ${smtk_PREFIX_PATH}/${SMTK_PYTHONPATH})
if(NOT IS_ABSOLUTE ${smtk_module_dir})
get_filename_component(smtk_module_dir
${PROJECT_BINARY_DIR}/${smtk_DIR}/${SMTK_PYTHON_MODULEDIR} ABSOLUTE)
......@@ -37,7 +37,7 @@ foreach (test ${smtkAdHExportTests})
set_tests_properties("${test}Py"
PROPERTIES
ENVIRONMENT "PYTHONPATH=${pyenv}"
LABELS "ADH Simulation"
LABELS "AdH Simulation"
)
if (pathenv)
set_property(TEST "${test}Py" APPEND
......
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