Commit 0334ea53 authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'use-external-smtk'

3c3b4a9b CMB: use external SMTK
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !478
parents 46c423ac 3c3b4a9b
......@@ -30,7 +30,7 @@ macro (superbuild_setup_variables)
superbuild_set_version_variables(cmb "${cmb_default_version}" "cmb-version.cmake" "version.txt")
set(cmb_version "${cmb_version_major}.${cmb_version_minor}")
if (smtk_SOURCE_SELECTION STREQUAL "git" OR smtk_SOURCE_SELECTION STREQUAL "from_cmb")
if (smtk_SOURCE_SELECTION STREQUAL "git")
# Assuming master; just use the latest version, but let the user set their
# own version in case it is actually a branch from some other version.
set(SMTK_VERSION_DEFAULT "<FETCH_FROM_GIT>"
......@@ -151,14 +151,6 @@ function (superbuild_sanity_check)
message(FATAL_ERROR
"At least one of the following projects must be enabled: cmb, smtk.")
endif ()
if (smtk_enabled AND
smtk_SOURCE_SELECTION STREQUAL "from_cmb" AND
NOT DEVELOPER_MODE_smtk AND
(NOT cmb_enabled OR DEVELOPER_MODE_cmb))
message(WARNING
"SMTK cannot use CMB's SMTK submodule without CMB being enabled and built by the superbuild. Pulling SMTK from git instead")
set(smtk_SOURCE_SELECTION "git" CACHE STRING "smtk source selection" FORCE)
endif ()
endfunction ()
function (superbuild_add_packaging)
......@@ -281,12 +273,3 @@ list(APPEND superbuild_ctest_custom_files
list(APPEND superbuild_project_roots
"${CMAKE_CURRENT_LIST_DIR}/projects")
add_subdirectory(superbuild)
if (TARGET "smtk" AND NOT DEVELOPER_MODE_smtk AND smtk_SOURCE_SELECTION STREQUAL "from_cmb")
get_property(smtk_need_cmb_download GLOBAL
PROPERTY smtk_need_cmb_download)
if (smtk_need_cmb_download)
add_dependencies("smtk"
"cmb-download")
endif ()
endif ()
......@@ -32,8 +32,8 @@ superbuild_add_project(cmb
DEFAULT_ON
INDEPENDENT_STEP_TARGETS ${cmb_lfs_steps} download update
DEPENDS boost moab remus vxl nlohmannjson python paraview pybind11
qt qt5 zeromq cmbworkflows cmbusersguide smtkusersguide
DEPENDS_OPTIONAL smtk cumulus ${cmb_extra_optional_dependencies}
qt qt5 smtk zeromq cmbworkflows cmbusersguide smtkusersguide
DEPENDS_OPTIONAL cumulus ${cmb_extra_optional_dependencies}
cxx11 gdal hdf5 netcdf opencv
CMAKE_ARGS
${cmb_extra_cmake_args}
......@@ -44,44 +44,11 @@ superbuild_add_project(cmb
#specify semi-colon separated paths for session plugins
-Dcmb_test_plugin_paths:STRING=<INSTALL_DIR>/${cmb_test_plugin_dir}
#specify what mesh workers we should build
-DBUILD_TRIANGLE_MESH_WORKER:BOOL=${triangle_enabled}
# specify the apple app install prefix. No harm in specifying it for all
# platforms.
-DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications
# This should be off by default because vtkCmbMoabReader in discrete
# session may only be needed for debugging purpose
-DSMTK_ENABLE_MOAB_DISCRETE_READER:BOOL=OFF
-DSMTK_ENABLE_OPENCV:BOOL=${opencv_enabled}
-DSMTK_ENABLE_QT_SUPPORT:BOOL=ON
-DSMTK_ENABLE_VTK_SUPPORT:BOOL=ON
-DSMTK_ENABLE_PARAVIEW_SUPPORT:BOOL=ON
-DSMTK_ENABLE_DISCRETE_SESSION:BOOL=ON
-DSMTK_ENABLE_EXODUS_SESSION:BOOL=ON
-DSMTK_ENABLE_REMOTE_SESSION:BOOL=ON
-DSMTK_ENABLE_REMUS_SUPPORT:BOOL=ON
-DSMTK_ENABLE_PYTHON_WRAPPING:BOOL=${smtk_enable_python_wrapping}
-DSMTK_ENABLE_VXL_SUPPORT:BOOL=${vxl_enabled}
-DSMTK_USE_PYBIND11:BOOL=ON
-DSMTK_QT_VERSION:STRING=5
-DSMTK_DATA_DIR:PATH=${CMB_TEST_DATA_ROOT}
-DSMTK_USE_SYSTEM_MOAB:BOOL=${moab_enabled}
-DMOAB_INCLUDE_DIR:PATH=<INSTALL_DIR>/include
# SMTK bits
-DUSE_SYSTEM_SMTK:BOOL=${smtk_enabled}
-DENABLE_HDF5:BOOL=${hdf5_enabled}
-DENABLE_NETCDF:BOOL=${netcdf_enabled}
-DNETCDF_ROOT:PATH=<INSTALL_DIR>
# Cumulus bits
-DSMTK_ENABLE_CUMULUS_SUPPORT:BOOL=${cumulus_enabled}
-DENABLE_Cumulus:BOOL=${cumulus_enabled}
-DCMB_SUPERBUILD_DEVELOPER_ROOT:PATH=<INSTALL_DIR>
# Set CMAKE_INSTALL_LIBDIR to "lib" for all projects in the superbuild to
......
......@@ -112,23 +112,6 @@ elseif (smtk_SOURCE_SELECTION STREQUAL "source")
if (EXISTS "${smtk_SOURCE_DIR}/.git")
set(smtk_can_lfs TRUE)
endif ()
elseif (smtk_SOURCE_SELECTION STREQUAL "from_cmb")
if (EXISTS "${smtk_source_dir}/thirdparty/smtk/.git" OR
cmb_SOURCE_SELECTION STREQUAL "git")
set(smtk_can_lfs TRUE)
endif ()
if (cmb_SOURCE_SELECTION STREQUAL "git")
# This is unfortunately necessary since the custom command is generated
# deep in the common-superbuild/ExternalProject infrastructure. A more
# proper solution would be to get the stamp file for each step and use
# `add_custom_command(APPEND)` to amend the dependencies for the `lfs-init`
# step to depend on the stamp file for the download step of CMB, but since
# CMB's target has not yet been declared, we can't query it here and the
# custom command doesn't exist at the top-level (where other `from_cmb`
# logic exists.
list(APPEND smtk_lfs_depends
"${CMAKE_BINARY_DIR}/superbuild/cmb/stamp/cmb-download")
endif ()
endif ()
option(smtk_FETCH_LFS "Fetch LFS data for CMB" OFF)
......
......@@ -46,10 +46,6 @@ superbuild_set_selectable_source(smtk
SELECT git CUSTOMIZABLE DEFAULT
GIT_REPOSITORY "https://gitlab.kitware.com/cmb/smtk.git"
GIT_TAG "origin/master"
SELECT from_cmb
DOWNLOAD_COMMAND
"${CMAKE_COMMAND}" -E echo_append
SOURCE_DIR "${smtk_source_dir}/thirdparty/smtk"
SELECT source CUSTOMIZABLE
SOURCE_DIR "source-smtk")
......
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