Commit 0d7d4abd authored by Ryan Krattiger's avatar Ryan Krattiger
Browse files

SUPERBUILD_PACKAGE_MODE=truchas

Added projects/truchas/truchas.configure.cmake
Added smtktruchasextenstions to cmb-superbuild
Added truchas.configure.cmake to packages/truchas
parent 3d19f768
......@@ -3,7 +3,7 @@ message(STATUS "Configuring modelbuilder package")
set_property(GLOBAL PROPERTY modelbuilder_PACKAGE_LABELS "CMB")
set_property(GLOBAL PROPERTY modelbuilder_PACKAGE_SUFFIX "<default>")
set_property(GLOBAL PROPERTY modelbuilder_PACKAGE_NAME "modelbuilder")
set_property(GLOBAL PROPERTY modelbuilder_REQUIRED_PROJECTS "cmb;smtk")
set_property(GLOBAL PROPERTY modelbuilder_REQUIRED_PROJECTS "cmb;smtk;cmbworkflows")
set_property(GLOBAL PROPERTY modelbuilder_EXCLUDE_PROJECTS "")
# Force this on for the modelbuilder mode
......
message(STATUS "Configuring modulebuild+truchas package")
set_property(GLOBAL PROPERTY truchas_PACKAGE_LABELS "TRUCHAS")
set_property(GLOBAL PROPERTY truchas_REQUIRED_PROJECTS "modelbuilder;smtktruchasextensions;cmb;smtkprojectmanager")
set_property(GLOBAL PROPERTY truchas_EXCLUDE_PROJECTS "")
include(SuperbuildVersionMacros)
superbuild_set_version_variables(smtktruchasextensions "1.0.0" "smtktruchasextensions-version.cmake" "version.txt")
set(truchas_extra_projects
smtkprojectmanager
smtktruchasextensions
)
list(APPEND superbuild_extra_package_projects "${truchas_extra_projects}")
list(APPEND smtk_plugin_omit
smtkDelaunayPlugin
smtkMeshPlugin
smtkMeshSessionPlugin
smtkOscillatorSessionPlugin
smtkPVMeshExtPlugin
smtkPolygonSessionPlugin)
set_property(GLOBAL PROPERTY smtk_plugin_omit ${smtk_plugin_omit})
set_property(GLOBAL APPEND PROPERTY cmb_extra_python_modules smtksimulationtruchas)
set_property(GLOBAL APPEND PROPERTY cmb_extra_plugins truchas-extensions)
# Turn on Truchas for this package mode
set(_superbuild_default_smtktruchasextensions ON)
# Turn off CMB default workflows for this package mode
set(_superbuild_default_cmbworkflows OFF)
if (DEVELOPER_MODE_smtk)
message(FATAL_ERROR "Cannot build in truchas packaging mode if DEVELOPER_MODE_smtk is ON")
endif ()
include(CMBBundleMacros)
cmb_generate_package_bundle(truchas
PACKAGE_NAME "modelbuilder+truchas"
DESCRIPTION "CMB + Truchas Extentions"
PACKAGE_VERSION smtktruchasextensions
HAS_EXAMPLES
HAS_WORKFLOWS
)
......@@ -42,9 +42,9 @@ if (smtkresourcemanagerstate_enabled)
list(APPEND cmb_plugins
read-and-write-resource-manager-state)
endif ()
get_property(cmb_extra_plugins GLOBAL PROPERTY CMB_EXTRA_PLUGINS)
if (cmb_extra_plugins)
list(APPEND cmb_plugins ${cmb_extra_plugins})
get_property(extra_plugins GLOBAL PROPERTY cmb_extra_plugins)
if (extra_plugins)
list(APPEND cmb_plugins ${extra_plugins})
endif ()
string(REPLACE ";" "${_superbuild_list_separator}"
cmb_plugins
......@@ -62,12 +62,14 @@ superbuild_add_project(cmb
DEFAULT_ON
${cmb_step_keyword} ${cmb_lfs_steps} download update
DEPENDS boost moab nlohmannjson python paraview pybind11
qt5 smtk cmbworkflows cmbusersguide smtkusersguide
qt5 smtk cmbusersguide smtkusersguide
DEPENDS_OPTIONAL cumulus ${cmb_extra_optional_dependencies}
cmbworkflows
cxx11 libarchive hdf5 netcdf opencv
remus rggsession vxl zeromq
smtkprojectmanager
smtkresourcemanagerstate
smtktruchasextensions
python2 python3
CMAKE_ARGS
${cmb_extra_cmake_args}
......
set(smtktruchasextensions_extra_cmake_args)
if (UNIX)
list(APPEND smtktruchasextensions_extra_cmake_args
"-DPYTHON_EXECUTABLE:PATH=${superbuild_install_location}/bin/python${superbuild_python_version}")
endif ()
set(smtktruchasextensions_rpaths)
if (APPLE AND USE_SYSTEM_qt5)
# On macOS, Qt5 packages use `@rpath` as their library ids. Add an rpath for
# it to the build.
list(APPEND smtktruchasextensions_rpaths
"${qt5_rpath}")
endif ()
string(REPLACE ";" "${_superbuild_list_separator}"
smtktruchasextensions_rpaths
"${smtktruchasextensions_rpaths}")
set(python_module_dir "lib/python${superbuild_python_version}/site-packages")
if (WIN32)
set(python_module_dir "bin/Lib/site-packages")
endif ()
set(enable_by_default OFF)
if ("${SUPERBUILD_PACKAGE_MODE}" STREQUAL "truchas")
set(enable_by_default ON)
endif()
superbuild_add_project(smtktruchasextensions
DEBUGGABLE
DEFAULT_ON
DEPENDS boost cxx11 paraview python qt5 smtk smtkprojectmanager
CMAKE_ARGS
${smtktruchasextensions_extra_cmake_args}
-DBUILD_EXAMPLES:BOOL=OFF
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_RPATH:STRING=${smtktruchasextensions_rpaths}
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DPYBIND11_INSTALL:BOOL=${pybind11_enabled}
-DSIMULATION_WORKFLOWS_ROOT:PATH=<INSTALL_DIR>/share/cmb/workflows
-DSMTK_PYTHON_MODULEDIR:PATH=<INSTALL_DIR>/${python_module_dir}
-DENABLE_PLUGIN_BY_DEFAULT=${enable_by_default}
)
superbuild_declare_paraview_xml_files(smtktruchasextensions
FILE_NAMES "smtk.truchas.xml"
DIRECTORY_HINTS "smtk-${smtk_version}")
......@@ -233,6 +233,10 @@ superbuild_set_revision(smtkprojectmanager
GIT_TAG "origin/master"
GIT_SHALLOW "${SUPERBUILD_SHALLOW_CLONES}")
superbuild_set_revision(smtktruchasextensions
GIT_REPOSITORY "https://gitlab.kitware.com/cmb/plugins/truchas-extensions.git"
GIT_TAG "origin/master")
superbuild_set_revision(pegtl
# https://github.com/taocpp/PEGTL/releases/tag/2.7.1
URL "https://www.computationalmodelbuilder.org/files/dependencies/PEGTL-2.7.1.tar.gz"
......
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