Commit 1a968f02 authored by jcfr's avatar jcfr

COMP: Conditionally configure Slicer inner project with BUILD_BRAINSTOOLS

If Slicer_BUILD_CLI is OFF, this option shouldn't be set or used..

This should shut down the following warning:

CMake Warning: The variable, 'BUILD_BRAINSTOOLS', specified manually, was not used during the generation.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16865 3bd1e089-480b-0410-8dfb-8563597acbee
parent c2a4ac79
......@@ -132,11 +132,15 @@ MARK_AS_ADVANCED(Slicer_ITK_GIT_REPOSITORY)
SET(Slicer_ITK_GIT_TAG "origin/slicer-4.0" CACHE STRING "ITK git tag to use")
MARK_AS_ADVANCED(Slicer_ITK_GIT_TAG)
# TODO: Option allowing to enable/disable specific module should be automatically added
# The following option has been added for conveniency so that BRAINSTOOL module can be
# enabled/disabled at the superbuild level.
OPTION(Slicer_BUILD_BRAINSTOOLS "Build the BRAINS subset of registration and segmentation tools." OFF)
MARK_AS_ADVANCED(Slicer_BUILD_BRAINSTOOLS)
IF(Slicer_BUILD_CLI)
# TODO: Option allowing to enable/disable specific module should be automatically added
# The following option has been added for conveniency so that BRAINSTOOL module can be
# enabled/disabled at the superbuild level.
OPTION(Slicer_BUILD_BRAINSTOOLS "Build the BRAINS subset of registration and segmentation tools." OFF)
MARK_AS_ADVANCED(Slicer_BUILD_BRAINSTOOLS)
ELSE()
UNSET(Slicer_BUILD_BRAINSTOOLS CACHE)
ENDIF()
#-----------------------------------------------------------------------------
# Install no development files by default, but allow the user to get
......
......@@ -218,10 +218,16 @@ ENDFOREACH()
#------------------------------------------------------------------------------
set(slicer_superbuild_extra_args)
if(DEFINED CTEST_CONFIGURATION_TYPE)
LIST(APPEND slicer_superbuild_extra_args -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE})
endif()
IF(Slicer_BUILD_CLI)
# BRAINSTOOLS module
LIST(APPEND slicer_superbuild_extra_args -DBUILD_BRAINSTOOLS:BOOL=${Slicer_BUILD_BRAINSTOOLS})
ENDIF()
set(proj Slicer)
ExternalProject_Add(${proj}
DEPENDS ${slicer_DEPENDENCIES}
......@@ -274,8 +280,6 @@ ExternalProject_Add(${proj}
-DCTK_DIR:PATH=${CTK_DIR}
# CTKAppLauncher
-DCTKAPPLAUNCHER_DIR:PATH=${CTKAPPLAUNCHER_DIR}
# BRAINSTOOLS module
-DBUILD_BRAINSTOOLS:BOOL=${Slicer_BUILD_BRAINSTOOLS}
INSTALL_COMMAND ""
)
......
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