Skip to content

Commit

Permalink
Only use TERMINAL feature with supported CMake version
Browse files Browse the repository at this point in the history
Change-Id: Icd1b8c0e7e8f45ef91b97f621fcf17f886d591bf
  • Loading branch information
blowekamp committed Dec 5, 2016
1 parent 0dcaa15 commit 6ca10ab
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 28 deletions.
5 changes: 1 addition & 4 deletions SuperBuild/External_GTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ endif()
ExternalProject_Add(${proj}
URL "${GTEST_URL}"
URL_MD5 ${GTEST_DOWNLOAD_SOURCE_HASH}
USES_TERMINAL_DOWNLOAD 1
INSTALL_DIR ${GTEST_install_dir}
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
Expand All @@ -53,13 +52,11 @@ ExternalProject_Add(${proj}
-D BUILD_SHARED_LIBS:BOOL=OFF
-D CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=<BINARY_DIR>/lib
-D gtest_disable_pthreads:BOOL=ON
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
INSTALL_COMMAND
${CMAKE_COMMAND} -E copy_directory ${${proj}_ARCHIVE_OUTPUT_DIRECTORY} <INSTALL_DIR>/lib
COMMAND
${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include <INSTALL_DIR>/include
${External_Project_USES_TERMINAL}
)

sitkSourceDownloadDependency(${proj})
Expand Down
7 changes: 2 additions & 5 deletions SuperBuild/External_ITK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_
ExternalProject_Add(${proj}
GIT_REPOSITORY ${ITK_REPOSITORY}
${ITK_TAG_COMMAND}
USES_TERMINAL_DOWNLOAD 1
UPDATE_COMMAND ""
SOURCE_DIR ${proj}
BINARY_DIR ${proj}-build
Expand Down Expand Up @@ -95,11 +94,9 @@ ExternalProject_Add(${proj}
-DSWIG_DIR:PATH=${SWIG_DIR}
-DSWIG_EXECUTABLE:PATH=${SWIG_EXECUTABLE}
BUILD_COMMAND ${BUILD_COMMAND_STRING}
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
DEPENDS
${ITK_DEPENDENCIES}
${ITK_DEPENDENCIES}
${External_Project_USES_TERMINAL}
)


Expand Down
5 changes: 1 addition & 4 deletions SuperBuild/External_Lua.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ set(lua_PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
ExternalProject_Add(Lua
URL "${lua_URL}"
URL_MD5 "${lua_DOWNLOAD_SOURCE_HASH}"
USES_TERMINAL_DOWNLOAD 1
PATCH_COMMAND ${lua_PATCH_COMMAND}
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
Expand All @@ -37,9 +36,7 @@ ExternalProject_Add(Lua
${ep_common_args}
-D BUILD_SHARED_LIBS:BOOL=OFF
-D CMAKE_INSTALL_PREFIX:PATH=${lua_install_dir}
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
${External_Project_USES_TERMINAL}
)

sitkSourceDownloadDependency(Lua)
Expand Down
5 changes: 1 addition & 4 deletions SuperBuild/External_PCRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ if(NOT PCRE_DIR)
ExternalProject_add(PCRE
URL "${PCRE_URL}"
URL_MD5 "${PCRE_DOWNLOAD_SOURCE_HASH}"
USES_TERMINAL_DOWNLOAD 1
CONFIGURE_COMMAND ${pcre_CONFIGURE_COMMAND}
DEPENDS "${PCRE_DEPENDENCIES}"
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
${External_Project_USES_TERMINAL}
)

sitkSourceDownloadDependency(PCRE)
Expand Down
3 changes: 1 addition & 2 deletions SuperBuild/External_SimpleITKExamples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ if (${BUILD_EXAMPLES} )
-DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.11/
-DCMAKE_SKIP_RPATH:BOOL=ON
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
BUILD_COMMAND ${BUILD_COMMAND_STRING}
INSTALL_COMMAND ""
DEPENDS "${SimpleITKExamples_DEPENDENCIES}"
${External_Project_USES_TERMINAL}
)

endif()
7 changes: 2 additions & 5 deletions SuperBuild/External_Swig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ if(NOT SWIG_DIR)
ExternalProject_Add(Swig
URL "${SWIGWIN_URL}"
URL_MD5 ${SWIG_DOWNLOAD_WIN_HASH}
USES_TERMINAL_DOWNLOAD 1
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/swigwin-${SWIG_TARGET_VERSION}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
${External_Project_USES_TERMINAL}
)
add_dependencies(Swig "SuperBuildSimpleITKSource")

Expand Down Expand Up @@ -108,12 +108,9 @@ if(NOT SWIG_DIR)

ExternalProject_add(Swig
${SWIG_DOWNLOAD_STEP}
USES_TERMINAL_DOWNLOAD 1
CONFIGURE_COMMAND ${swig_CONFIGURE_COMMAND}
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
DEPENDS "${Swig_DEPENDENCIES}"
${External_Project_USES_TERMINAL}
)

if(NOT USE_SWIG_FROM_GIT)
Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/External_virtualenv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ sitkSourceDownload(${proj}_URL "virtualenv-${${proj}_TARGET_VERSION}.tar.gz" ${$
ExternalProject_Add(${proj}
URL "${${proj}_URL}"
URL_MD5 ${${proj}_DOWNLOAD_SOURCE_HASH}
USES_TERMINAL_DOWNLOAD 1
SOURCE_DIR ${${proj}_source_dir}
BINARY_DIR ${${proj}_binary_dir}
INSTALL_DIR ${${proj}_install_dir}
Expand All @@ -31,6 +30,7 @@ ExternalProject_Add(${proj}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
${External_Project_USES_TERMINAL}
)

sitkSourceDownloadDependency(${proj})
Expand Down
12 changes: 9 additions & 3 deletions SuperBuild/SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ VariableListToCache( ep_common_list ep_common_cache )
include(sitkLanguageOptions)


if(NOT CMAKE_VERSION VERSION_LESS 3.4)
set(External_Project_USES_TERMINAL
USES_TERMINAL_DOWNLOAD 1
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1)
endif()

#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
include(ExternalProject)

Expand Down Expand Up @@ -425,10 +433,8 @@ ExternalProject_Add(${proj}
-DWRAP_CSHARP:BOOL=${WRAP_CSHARP}
-DWRAP_R:BOOL=${WRAP_R}
-DBUILD_EXAMPLES:BOOL=${BUILD_TESTING}
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
DEPENDS ${${CMAKE_PROJECT_NAME}_DEPENDENCIES}
${External_Project_USES_TERMINAL}
)

ExternalProject_Add_Step(${proj} forcebuild
Expand Down

0 comments on commit 6ca10ab

Please sign in to comment.