[Repository Listing] / [Slicer4] / trunk / SuperBuild.cmake
 

View of /trunk/SuperBuild.cmake

Parent Directory Parent Directory Revision Log Revision Log


Revision 26366  Download Blame
File size: 18086 byte(s)
BUG: Fix EMSegment test re-enabling BRAINSDemonWarp module

This commit re-enables the building of BRAINSDemonWarp inadvertently
disabled in r26353 (Fix macOS compilation error disabling extra BRAINSTools CLIs)
and fixes the failing test EMSegCL_Task_MRIHumanBrainExp_BRAINS_small.

Since build error originally fixed in r26353 was associated with the new
module BRAINSRefacer, it will not break the build:

```
$ make BRAINSDemonWarp
[...]
[100%] Linking CXX executable ../../../../lib/Slicer-4.7/cli-modules/BRAINSDemonWarp
Copying XML file 'BRAINSDemonWarp.xml' along side the executable
[100%] Built target BRAINSDemonWarp

```
1 ################################################################################
2 #
3 # Program: 3D Slicer
4 #
5 # Copyright (c) Kitware Inc.
6 #
7 # See COPYRIGHT.txt
8 # or http://www.slicer.org/copyright/copyright.txt for details.
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # This file was originally developed by
17 # Dave Partyka and Jean-Christophe Fillion-Robin, Kitware Inc.
18 # and was partially funded by NIH grant 3P41RR013218-12S1
19 #
20 ################################################################################
21
22 #-----------------------------------------------------------------------------
23 # CMake https support
24 #-----------------------------------------------------------------------------
25 include(SlicerCheckCMakeHTTPS)
26
27 #-----------------------------------------------------------------------------
28 # Git protocol option
29 #-----------------------------------------------------------------------------
30 option(${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL "If behind a firewall turn this off to use http instead." ON)
31 set(git_protocol "git")
32 if(NOT ${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL)
33 set(git_protocol "http")
34
35 # Verify that the global git config has been updated with the expected "insteadOf" option.
36 function(_check_for_required_git_config_insteadof base insteadof)
37 execute_process(
38 COMMAND ${GIT_EXECUTABLE} config --global --get "url.${base}.insteadof"
39 OUTPUT_VARIABLE output
40 OUTPUT_STRIP_TRAILING_WHITESPACE
41 RESULT_VARIABLE error_code
42 )
43 if(error_code OR NOT "${output}" STREQUAL "${insteadof}")
44 message(FATAL_ERROR
45 "Since the ExternalProject modules doesn't provide a mechanism to customize the clone step by "
46 "adding 'git config' statement between the 'git checkout' and the 'submodule init', it is required "
47 "to manually update your global git config to successfully build ${CMAKE_PROJECT_NAME} with "
48 "option ${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL set to FALSE. "
49 "See http://na-mic.org/Mantis/view.php?id=2731"
50 "\nYou could do so by running the command:\n"
51 " ${GIT_EXECUTABLE} config --global url.\"${base}\".insteadOf \"${insteadof}\"\n")
52 endif()
53 endfunction()
54
55 if("${ITK_VERSION_MAJOR}" LESS 4)
56 _check_for_required_git_config_insteadof("http://itk.org/" "git://itk.org/")
57 endif()
58
59 endif()
60
61 #-----------------------------------------------------------------------------
62 # Enable and setup External project global properties
63 #-----------------------------------------------------------------------------
64
65 set(ep_common_c_flags "${CMAKE_C_FLAGS_INIT} ${ADDITIONAL_C_FLAGS}")
66 set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS}")
67
68 #-----------------------------------------------------------------------------
69 # Define list of additional options used to configure Slicer
70 #------------------------------------------------------------------------------
71
72 if(DEFINED CTEST_CONFIGURATION_TYPE)
73 mark_as_superbuild(CTEST_CONFIGURATION_TYPE)
74 endif()
75
76 if(DEFINED CMAKE_CONFIGURATION_TYPES)
77 mark_as_superbuild(CMAKE_CONFIGURATION_TYPES)
78 endif()
79
80 # Provide a mechanism to disable one or more modules.
81 mark_as_superbuild(
82 Slicer_QTLOADABLEMODULES_DISABLED:STRING
83 Slicer_QTSCRIPTEDMODULES_DISABLED:STRING
84 Slicer_CLIMODULES_DISABLED:STRING
85 )
86
87 #------------------------------------------------------------------------------
88 # Slicer dependency list
89 #------------------------------------------------------------------------------
90
91 set(ITK_EXTERNAL_NAME ITKv4)
92
93 set(VTK_EXTERNAL_NAME VTKv8)
94
95 set(Slicer_DEPENDENCIES
96 curl
97 CTKAppLauncherLib
98 teem
99 ${VTK_EXTERNAL_NAME}
100 ${ITK_EXTERNAL_NAME}
101 CTK
102 LibArchive
103 RapidJSON
104 )
105
106 set(CURL_ENABLE_SSL ${Slicer_USE_PYTHONQT_WITH_OPENSSL})
107
108 if(Slicer_USE_OpenIGTLink)
109 list(APPEND Slicer_DEPENDENCIES OpenIGTLink)
110 endif()
111
112 if(Slicer_USE_SimpleITK)
113 list(APPEND Slicer_DEPENDENCIES SimpleITK)
114 endif()
115
116 if(Slicer_BUILD_CLI_SUPPORT)
117 list(APPEND Slicer_DEPENDENCIES SlicerExecutionModel)
118 endif()
119
120 if(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT)
121 list(APPEND Slicer_DEPENDENCIES qRestAPI)
122 endif()
123
124 if(Slicer_BUILD_DICOM_SUPPORT)
125 list(APPEND Slicer_DEPENDENCIES DCMTK)
126 endif()
127
128 if(Slicer_BUILD_DICOM_SUPPORT AND Slicer_USE_PYTHONQT_WITH_OPENSSL)
129 list(APPEND Slicer_DEPENDENCIES python-pydicom)
130 endif()
131
132 if(Slicer_USE_PYTHONQT AND Slicer_BUILD_EXTENSIONMANAGER_SUPPORT)
133 list(APPEND Slicer_DEPENDENCIES
134 python-chardet
135 python-couchdb
136 python-GitPython
137 python-pip
138 )
139 if(Slicer_USE_PYTHONQT_WITH_OPENSSL OR Slicer_USE_SYSTEM_python)
140 # python-PyGithub requires SSL support in Python
141 list(APPEND Slicer_DEPENDENCIES python-PyGithub)
142 else()
143 message(STATUS "--------------------------------------------------")
144 message(STATUS "Python was built without SSL support; "
145 "github integration will not be available. "
146 "Set Slicer_USE_PYTHONQT_WITH_OPENSSL=ON to enable this feature.")
147 message(STATUS "--------------------------------------------------")
148 endif()
149 endif()
150
151 if(Slicer_USE_CTKAPPLAUNCHER)
152 list(APPEND Slicer_DEPENDENCIES CTKAPPLAUNCHER)
153 endif()
154
155 if(Slicer_USE_PYTHONQT)
156 set(PYTHON_ENABLE_SSL ${Slicer_USE_PYTHONQT_WITH_OPENSSL})
157 list(APPEND Slicer_DEPENDENCIES python)
158 endif()
159
160 if(Slicer_USE_NUMPY)
161 list(APPEND Slicer_DEPENDENCIES NUMPY)
162 endif()
163
164 if(Slicer_USE_PYTHONQT_WITH_TCL AND UNIX)
165 list(APPEND Slicer_DEPENDENCIES incrTcl)
166 endif()
167
168 if(DEFINED Slicer_ADDITIONAL_DEPENDENCIES)
169 list(APPEND Slicer_DEPENDENCIES ${Slicer_ADDITIONAL_DEPENDENCIES})
170 endif()
171
172 mark_as_superbuild(Slicer_DEPENDENCIES:STRING)
173
174 #------------------------------------------------------------------------------
175 # Include remote modules
176 #------------------------------------------------------------------------------
177 include(ExternalProjectAddSource)
178
179 macro(list_conditional_append cond list)
180 if(${cond})
181 list(APPEND ${list} ${ARGN})
182 endif()
183 endmacro()
184
185 Slicer_Remote_Add(jqPlot
186 URL http://slicer.kitware.com/midas3/download?items=15065&dummy=jquery.jqplot.1.0.4r1120.tar.gz
187 URL_MD5 5c5d73730145c3963f09e1d3ca355580
188 SOURCE_DIR_VAR jqPlot_DIR
189 LABELS FIND_PACKAGE
190 )
191 list(APPEND Slicer_REMOTE_DEPENDENCIES jqPlot)
192
193 Slicer_Remote_Add(OpenIGTLinkIF
194 GIT_REPOSITORY ${git_protocol}://github.com/Slicer/OpenIGTLinkIF.git
195 GIT_TAG 06379c2bb8581d54851a1ba299e2daf40cec2c21
196 OPTION_NAME Slicer_BUILD_OpenIGTLinkIF
197 OPTION_DEPENDS "Slicer_BUILD_QTLOADABLEMODULES;Slicer_USE_OpenIGTLink"
198 LABELS REMOTE_MODULE
199 )
200 list_conditional_append(Slicer_BUILD_OpenIGTLinkIF Slicer_REMOTE_DEPENDENCIES OpenIGTLinkIF)
201
202 option(Slicer_BUILD_MULTIVOLUME_SUPPORT "Build MultiVolume support." ON)
203 mark_as_advanced(Slicer_BUILD_MULTIVOLUME_SUPPORT)
204
205 Slicer_Remote_Add(MultiVolumeExplorer
206 GIT_REPOSITORY ${git_protocol}://github.com/fedorov/MultiVolumeExplorer.git
207 GIT_TAG b1bb131c41b6fa47a5c298b5d36b95b2e739d2e3
208 OPTION_NAME Slicer_BUILD_MultiVolumeExplorer
209 OPTION_DEPENDS "Slicer_BUILD_QTLOADABLEMODULES;Slicer_BUILD_MULTIVOLUME_SUPPORT;Slicer_USE_PYTHONQT"
210 LABELS REMOTE_MODULE
211 )
212 list_conditional_append(Slicer_BUILD_MultiVolumeExplorer Slicer_REMOTE_DEPENDENCIES MultiVolumeExplorer)
213
214 Slicer_Remote_Add(MultiVolumeImporter
215 GIT_REPOSITORY ${git_protocol}://github.com/fedorov/MultiVolumeImporter.git
216 GIT_TAG b2453a8b93a755e440356d408178e899f6b8ee29
217 OPTION_NAME Slicer_BUILD_MultiVolumeImporter
218 OPTION_DEPENDS "Slicer_BUILD_QTLOADABLEMODULES;Slicer_BUILD_MULTIVOLUME_SUPPORT;Slicer_USE_PYTHONQT"
219 LABELS REMOTE_MODULE
220 )
221 list_conditional_append(Slicer_BUILD_MultiVolumeImporter Slicer_REMOTE_DEPENDENCIES MultiVolumeImporter)
222
223 Slicer_Remote_Add(SimpleFilters
224 GIT_REPOSITORY ${git_protocol}://github.com/SimpleITK/SlicerSimpleFilters.git
225 GIT_TAG 0e0648faeea0b3cbb8c27a93be0d95253ce13b98
226 OPTION_NAME Slicer_BUILD_SimpleFilters
227 OPTION_DEPENDS "Slicer_BUILD_QTSCRIPTEDMODULES;Slicer_USE_SimpleITK"
228 LABELS REMOTE_MODULE
229 )
230 list_conditional_append(Slicer_BUILD_SimpleFilters Slicer_REMOTE_DEPENDENCIES SimpleFilters)
231
232 set(BRAINSTools_options
233 BRAINSTools_SUPERBUILD:BOOL=OFF
234 BRAINSTools_CLI_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${Slicer_BINARY_INNER_SUBDIR}/${Slicer_CLIMODULES_LIB_DIR}
235 BRAINSTools_CLI_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${Slicer_BINARY_INNER_SUBDIR}/${Slicer_CLIMODULES_LIB_DIR}
236 BRAINSTools_CLI_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_BINARY_DIR}/${Slicer_BINARY_INNER_SUBDIR}/${Slicer_CLIMODULES_BIN_DIR}
237 BRAINSTools_CLI_INSTALL_LIBRARY_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
238 BRAINSTools_CLI_INSTALL_ARCHIVE_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
239 BRAINSTools_CLI_INSTALL_RUNTIME_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_BIN_DIR}
240 BRAINSTools_DISABLE_TESTING:BOOL=ON
241 USE_BRAINSFit:BOOL=ON
242 USE_BRAINSROIAuto:BOOL=ON
243 USE_BRAINSResample:BOOL=ON
244 USE_BRAINSDemonWarp:BOOL=ON
245 # BRAINSTools comes with some extra tool that should not be compiled by default
246 USE_AutoWorkup:BOOL=OFF
247 USE_ReferenceAtlas:BOOL=OFF
248 USE_ANTS:BOOL=OFF
249 USE_GTRACT:BOOL=OFF
250 USE_BRAINSABC:BOOL=OFF
251 USE_BRAINSTalairach:BOOL=OFF
252 USE_BRAINSConstellationDetector:BOOL=OFF
253 USE_BRAINSMush:BOOL=OFF
254 USE_BRAINSInitializedControlPoints:BOOL=OFF
255 USE_BRAINSMultiModeSegment:BOOL=OFF
256 USE_BRAINSCut:BOOL=OFF
257 USE_BRAINSLandmarkInitializer:BOOL=OFF
258 USE_ImageCalculator:BOOL=OFF
259 USE_BRAINSSurfaceTools:BOOL=OFF
260 USE_BRAINSSnapShotWriter:BOOL=OFF
261 USE_ConvertBetweenFileFormats:BOOL=OFF
262 USE_BRAINSMultiSTAPLE:BOOL=OFF
263 USE_BRAINSCreateLabelMapFromProbabilityMaps:BOOL=OFF
264 USE_BRAINSContinuousClass:BOOL=OFF
265 USE_ICCDEF:BOOL=OFF
266 USE_BRAINSPosteriorToContinuousClass:BOOL=OFF
267 USE_DebugImageViewer:BOOL=OFF
268 BRAINS_DEBUG_IMAGE_WRITE:BOOL=OFF
269 USE_BRAINSTransformConvert:BOOL=ON
270 USE_DWIConvert:BOOL=${Slicer_BUILD_DICOM_SUPPORT} ## Need to figure out library linking
271 USE_BRAINSDemonWarp:BOOL=ON
272 USE_BRAINSRefacer:BOOL=OFF
273 )
274 Slicer_Remote_Add(BRAINSTools
275 GIT_REPOSITORY "${git_protocol}://github.com/Slicer/BRAINSTools.git"
276 # Include patch exporting "BRAINSCommonLib"
277 GIT_TAG "7994f927335f5c9a5376358d164816fd1e5c911e" # master (from 2017-08-04, post v4.7.1)
278 OPTION_NAME Slicer_BUILD_BRAINSTOOLS
279 OPTION_DEPENDS "Slicer_BUILD_CLI_SUPPORT;Slicer_BUILD_CLI"
280 LABELS REMOTE_MODULE
281 VARS ${BRAINSTools_options}
282 )
283 list_conditional_append(Slicer_BUILD_BRAINSTOOLS Slicer_REMOTE_DEPENDENCIES BRAINSTools)
284 if(Slicer_BUILD_BRAINSTOOLS)
285 # This is added to SlicerConfig and is useful for extension depending on BRAINSTools
286 set(BRAINSCommonLib_DIR "${CMAKE_BINARY_DIR}/${Slicer_BINARY_INNER_SUBDIR}/Modules/Remote/BRAINSTools/BRAINSCommonLib")
287 mark_as_superbuild(BRAINSCommonLib_DIR:PATH)
288 endif()
289
290 Slicer_Remote_Add(EMSegment
291 SVN_REPOSITORY "http://svn.slicer.org/Slicer3/branches/Slicer4-EMSegment"
292 SVN_REVISION -r "17140"
293 OPTION_NAME Slicer_BUILD_EMSegment
294 OPTION_DEPENDS "Slicer_BUILD_BRAINSTOOLS;Slicer_BUILD_QTLOADABLEMODULES;Slicer_USE_PYTHONQT_WITH_TCL"
295 LABELS REMOTE_MODULE
296 )
297 list_conditional_append(Slicer_BUILD_EMSegment Slicer_REMOTE_DEPENDENCIES EMSegment)
298
299 Slicer_Remote_Add(OtsuThresholdImageFilter
300 GIT_REPOSITORY "${git_protocol}://github.com/Slicer/Slicer-OtsuThresholdImageFilter"
301 GIT_TAG "cf39e5064472af31809ec1fa2f93fb97dc9a606e"
302 OPTION_NAME Slicer_BUILD_OtsuThresholdImageFilter
303 OPTION_DEPENDS "Slicer_BUILD_EMSegment"
304 LABELS REMOTE_MODULE
305 )
306 list_conditional_append(Slicer_BUILD_OtsuThresholdImageFilter Slicer_REMOTE_DEPENDENCIES OtsuThresholdImageFilter)
307
308 Slicer_Remote_Add(DataStore
309 GIT_REPOSITORY "${git_protocol}://github.com/Slicer/Slicer-DataStore"
310 GIT_TAG "57c6cb725344b5ec7a44a9644109b4589237d119"
311 OPTION_NAME Slicer_BUILD_DataStore
312 LABELS REMOTE_MODULE
313 )
314 list_conditional_append(Slicer_BUILD_DataStore Slicer_REMOTE_DEPENDENCIES DataStore)
315
316 Slicer_Remote_Add(CompareVolumes
317 GIT_REPOSITORY "${git_protocol}://github.com/pieper/CompareVolumes"
318 GIT_TAG "c402286bf8dcb4a050a055bfd96548eb9876b485"
319 OPTION_NAME Slicer_BUILD_CompareVolumes
320 OPTION_DEPENDS "Slicer_USE_PYTHONQT"
321 LABELS REMOTE_MODULE
322 )
323 list_conditional_append(Slicer_BUILD_CompareVolumes Slicer_REMOTE_DEPENDENCIES CompareVolumes)
324
325 Slicer_Remote_Add(LandmarkRegistration
326 GIT_REPOSITORY "${git_protocol}://github.com/pieper/LandmarkRegistration"
327 GIT_TAG "a8c80bccea13979a98e967ed226a13d123a9c7ac"
328 OPTION_NAME Slicer_BUILD_LandmarkRegistration
329 OPTION_DEPENDS "Slicer_BUILD_CompareVolumes;Slicer_USE_PYTHONQT"
330 LABELS REMOTE_MODULE
331 )
332 list_conditional_append(Slicer_BUILD_LandmarkRegistration Slicer_REMOTE_DEPENDENCIES LandmarkRegistration)
333
334 #-----------------------------------------------------------------------------
335 # Define list of additional options used to configure Slicer
336 #------------------------------------------------------------------------------
337
338 # Projects that Slicer needs to download/configure/build/install...
339 list(APPEND Slicer_ADDITIONAL_PROJECTS ${Slicer_ADDITIONAL_DEPENDENCIES})
340 if(Slicer_ADDITIONAL_PROJECTS)
341 list(REMOVE_DUPLICATES Slicer_ADDITIONAL_PROJECTS)
342 foreach(additional_project ${Slicer_ADDITIONAL_PROJECTS})
343 # needed to do find_package within Slicer
344 mark_as_superbuild(${additional_project}_DIR:PATH)
345 endforeach()
346 mark_as_superbuild(Slicer_ADDITIONAL_PROJECTS:STRING)
347 endif()
348
349 include(ListToString)
350
351 ExternalProject_Include_Dependencies(Slicer DEPENDS_VAR Slicer_DEPENDENCIES)
352
353 set(EXTERNAL_PROJECT_OPTIONAL_ARGS)
354 if(WIN32)
355 list(APPEND EXTERNAL_PROJECT_OPTIONAL_ARGS -DSlicer_SKIP_ROOT_DIR_MAX_LENGTH_CHECK:BOOL=ON)
356 endif()
357
358 #------------------------------------------------------------------------------
359 # Slicer_EXTENSION_SOURCE_DIRS
360 #------------------------------------------------------------------------------
361
362 #
363 # Configuring Slicer using
364 #
365 # cmake -DSlicer_EXTENSION_SOURCE_DIRS:STRING=/path/to/ExtensionA;/path/to/ExtensionB [...] /path/to/source/Slicer
366 #
367 # will ensure the source of each extensions are *built* by Slicer. This is done
368 # as part of the Slicer inner build by adding each directory in the top-level CMakeLists.txt.
369 #
370 # Note that using 'Slicer_Remote_Add' specifying the label 'REMOTE_EXTENSION' (see above)
371 # will checkout the extension sources and append the corresponding source directory to
372 # the variable Slicer_EXTENSION_SOURCE_DIRS.
373 #
374
375 #------------------------------------------------------------------------------
376 # Slicer_EXTENSION_INSTALL_DIRS
377 #------------------------------------------------------------------------------
378
379 #
380 # Configuring Slicer using
381 #
382 # cmake -DSlicer_EXTENSION_INSTALL_DIRS:STRING=/path/to/ExtensionA-install-tree;/path/to/ExtensionB-install-tree [...] /path/to/source/Slicer
383 #
384 # will ensure the content of each extensions install directories are *packaged*
385 # with Slicer.
386 #
387 # Corresponding install rules are found in "CMake/SlicerBlockInstallExtensionPackages.cmake"
388 #
389
390 #------------------------------------------------------------------------------
391 # Configure and build Slicer
392 #------------------------------------------------------------------------------
393 set(proj Slicer)
394
395 ExternalProject_Add(${proj}
396 ${${proj}_EP_ARGS}
397 DEPENDS ${Slicer_DEPENDENCIES} ${Slicer_REMOTE_DEPENDENCIES}
398 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
399 BINARY_DIR ${Slicer_BINARY_INNER_SUBDIR}
400 DOWNLOAD_COMMAND ""
401 UPDATE_COMMAND ""
402 CMAKE_CACHE_ARGS
403 -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
404 -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
405 -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
406 -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
407 -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
408 -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED}
409 -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS}
410 -DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
411 -DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
412 -DSlicer_REQUIRED_C_FLAGS:STRING=${Slicer_REQUIRED_C_FLAGS}
413 -DSlicer_REQUIRED_CXX_FLAGS:STRING=${Slicer_REQUIRED_CXX_FLAGS}
414 -DSlicer_SUPERBUILD:BOOL=OFF
415 -DSlicer_SUPERBUILD_DIR:PATH=${Slicer_BINARY_DIR}
416 -D${Slicer_MAIN_PROJECT}_APPLICATION_NAME:STRING=${${Slicer_MAIN_PROJECT}_APPLICATION_NAME}
417 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR}
418 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR}
419 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH}
420 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK}
421 -D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC}
422 -DSlicer_APPLICATIONS_DIR:PATH=${Slicer_APPLICATIONS_DIR}
423 -DSlicer_EXTENSION_SOURCE_DIRS:STRING=${Slicer_EXTENSION_SOURCE_DIRS}
424 -DSlicer_EXTENSION_INSTALL_DIRS:STRING=${Slicer_EXTENSION_INSTALL_DIRS}
425 -DExternalData_OBJECT_STORES:PATH=${ExternalData_OBJECT_STORES}
426 ${EXTERNAL_PROJECT_OPTIONAL_ARGS}
427 INSTALL_COMMAND ""
428 )
429
430 # This custom external project step forces the build and later
431 # steps to run whenever a top level build is done...
432 #
433 # BUILD_ALWAYS flag is available in CMake 3.1 that allows force build
434 # of external projects without this workaround. Remove this workaround
435 # and use the CMake flag instead, when Slicer's required minimum CMake
436 # version will be at least 3.1.
437 #
438 if(CMAKE_CONFIGURATION_TYPES)
439 set(BUILD_STAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-stamp/${CMAKE_CFG_INTDIR}/${proj}-build")
440 else()
441 set(BUILD_STAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-stamp/${proj}-build")
442 endif()
443 ExternalProject_Add_Step(${proj} forcebuild
444 COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_STAMP_FILE}
445 COMMENT "Forcing build step for '${proj}'"
446 DEPENDEES build
447 ALWAYS 1
448 )

  Subversion  TortoiseSVN  ViewVC