Commit d69de4ca authored by Ben Boeckel's avatar Ben Boeckel

smtk: depend on the download of CMB for LFS if necessary

parent 46e19c7f
......@@ -31,6 +31,7 @@ macro (cmb_superbuild_add_lfs_steps _name)
--local
DEPENDEES download
DEPENDERS configure
DEPENDS ${ARGN}
COMMENT "Enabling LFS for ${_name}"
WORKING_DIRECTORY <SOURCE_DIR>)
......
......@@ -107,6 +107,7 @@ if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_CXX_COMPILER_VERS
endif ()
set(smtk_can_lfs FALSE)
set(smtk_lfs_depends)
if (smtk_SOURCE_SELECTION STREQUAL "git")
set(smtk_can_lfs TRUE)
elseif (smtk_SOURCE_SELECTION STREQUAL "source")
......@@ -118,9 +119,21 @@ elseif (smtk_SOURCE_SELECTION STREQUAL "from_cmb")
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)
if (smtk_enabled AND smtk_can_lfs AND smtk_FETCH_LFS)
cmb_superbuild_add_lfs_steps(smtk)
cmb_superbuild_add_lfs_steps(smtk ${smtk_lfs_depends})
endif ()
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