Commit c84e77fa authored by jcfr's avatar jcfr

COMP: Fix CDash errors/warnings reporting for unix parallel build

Setting the variable CTEST_USE_LAUNCHERS_DEFAULT in the environment
to enable CTest launcher reliably will be supported by default in either
CMake 2.8.10 or 2.8.11.

In the mean time, your local installation of CMake can be modified based on
the following topic: https://github.com/jcfr/CMake/tree/fix-ctest-use-launchers-for-superbuild

See http://na-mic.org/Mantis/view.php?id=2468

Fixes #2468

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21112 3bd1e089-480b-0410-8dfb-8563597acbee
parent 14a9816f
......@@ -106,13 +106,7 @@ endif()
set(track ${CTEST_TRACK_PREFIX}${track}${CTEST_TRACK_SUFFIX})
# For more details, see http://www.kitware.com/blog/home/post/11
set(CTEST_USE_LAUNCHERS 0)
if(CTEST_CMAKE_GENERATOR MATCHES ".*Makefiles.*")
set(CTEST_USE_LAUNCHERS 1)
endif()
#if(NOT ${CTEST_CMAKE_GENERATOR} MATCHES "Visual Studio")
# set(CTEST_USE_LAUNCHERS 1)
#endif()
set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1)
if(empty_binary_directory)
message("Directory ${CTEST_BINARY_DIRECTORY} cleaned !")
......@@ -184,7 +178,6 @@ macro(run_ctest)
# Write initial cache.
#-----------------------------------------------------------------------------
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
CTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
QT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
GIT_EXECUTABLE:FILEPATH=${CTEST_GIT_COMMAND}
Subversion_SVN_EXECUTABLE:FILEPATH=${CTEST_SVN_COMMAND}
......
......@@ -28,6 +28,12 @@ set(CMAKE_MODULE_PATH
set(Slicer_CMAKE_DIR ${Slicer_SOURCE_DIR}/CMake)
set(Slicer_EXTENSIONS_CMAKE_DIR ${Slicer_SOURCE_DIR}/Extensions/CMake)
#-----------------------------------------------------------------------------
include(CTestUseLaunchers OPTIONAL)
if(${CTEST_USE_LAUNCHERS})
message(STATUS "CTest launchers enabled")
endif()
#-----------------------------------------------------------------------------
# VAriable Slicer_LANGUAGES
#-----------------------------------------------------------------------------
......
......@@ -232,10 +232,7 @@ message("EXTENSIONS_BUILDSYSTEM_SOURCE_DIRECTORY: ${EXTENSIONS_BUILDSYSTEM_SOURC
message("Slicer_DIR ................: ${Slicer_DIR}")
# For more details, see http://www.kitware.com/blog/home/post/11
set(CTEST_USE_LAUNCHERS 0)
if(CTEST_CMAKE_GENERATOR MATCHES ".*Makefiles.*")
set(CTEST_USE_LAUNCHERS 1)
endif()
set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1)
if(empty_binary_directory)
message("Directory ${CTEST_BINARY_DIRECTORY} cleaned !")
......@@ -331,7 +328,6 @@ macro(run_ctest)
#-----------------------------------------------------------------------------
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
CTEST_MODEL:STRING=${model}
CTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
Slicer_EXTENSIONS_TRACK_QUALIFIER:STRING=${EXTENSIONS_TRACK_QUALIFIER}
GIT_EXECUTABLE:FILEPATH=${CTEST_GIT_COMMAND}
Subversion_SVN_EXECUTABLE:FILEPATH=${CTEST_SVN_COMMAND}
......
......@@ -185,14 +185,6 @@ set(ep_cmake_boolean_args
Slicer_BUILD_SlicerWebGLExport
)
# Add CTEST_USE_LAUNCHER only if already defined and enabled.
# It avoids extra overhead for manual builds and still allow the option
# to be propagated to the external project.
# See http://www.kitware.com/blog/home/post/11
if(DEFINED CTEST_USE_LAUNCHER AND "${CTEST_USE_LAUNCHER}")
list(APPEND ep_cmake_boolean_args CTEST_USE_LAUNCHER)
endif()
# Add the option to disable Java even when found on the machine.
list(APPEND ep_cmake_boolean_args CMAKE_DISABLE_FIND_PACKAGE_Java)
......
......@@ -66,7 +66,7 @@ if(NOT DEFINED CTK_DIR)
ExternalProject_Add(${proj}
GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTK.git"
GIT_TAG "5a04ea58cf3cc9be4797dc28da646c1cdd0e5980"
GIT_TAG "1351eafcea5b7374d4f8c45629a0a4637bdc2946"
"${slicer_external_update}"
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
......
......@@ -23,6 +23,12 @@ if(NOT DEFINED DCMTK_DIR)
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG)
if(CTEST_USE_LAUNCHERS)
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG
"-DCMAKE_PROJECT_DCMTK_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake")
endif()
set(DCMTK_REPOSITORY ${git_protocol}://git.dcmtk.org/dcmtk.git)
set(DCMTK_GIT_TAG "ab844899a92f46e2d880c38c85ce098933533aef")
......@@ -41,6 +47,7 @@ if(NOT DEFINED DCMTK_DIR)
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
${CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DBUILD_SHARED_LIBS:BOOL=OFF
-DDCMTK_WITH_DOXYGEN:BOOL=OFF
......
......@@ -30,6 +30,12 @@ if(NOT DEFINED ITK_DIR)
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG)
if(CTEST_USE_LAUNCHERS)
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG
"-DCMAKE_PROJECT_ITK_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake")
endif()
set(${CMAKE_PROJECT_NAME}_${proj}_GIT_REPOSITORY "github.com/Kitware/ITK.git" CACHE STRING "Repository from which to get ITK" FORCE)
# release-3.20 branch on 2012-09-26.
set(${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG "dcd655f89c" CACHE STRING "ITK git tag to use" FORCE)
......@@ -53,6 +59,7 @@ if(NOT DEFINED ITK_DIR)
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
${CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
......
......@@ -22,6 +22,12 @@ if(APPLE)
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG)
if(CTEST_USE_LAUNCHERS)
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG
"-DCMAKE_PROJECT_OpenIGTLink_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake")
endif()
#message(STATUS "${__indent}Adding project ${proj}")
ExternalProject_Add(${proj}
......@@ -37,6 +43,7 @@ ExternalProject_Add(${proj}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
${CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DBUILD_TESTING:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
......
......@@ -25,7 +25,7 @@ endif()
#message(STATUS "${__indent}Adding project ${proj}")
ExternalProject_Add(${proj}
SVN_REPOSITORY "http://svn.slicer.org/Slicer3-lib-mirrors/trunk/cmcurl"
SVN_REVISION -r "138"
SVN_REVISION -r "185"
"${slicer_external_update}"
SOURCE_DIR cmcurl
BINARY_DIR cmcurl-build
......
......@@ -22,6 +22,12 @@ if(APPLE)
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG)
if(CTEST_USE_LAUNCHERS)
set(CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG
"-DCMAKE_PROJECT_Teem_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake")
endif()
#message(STATUS "${__indent}Adding project ${proj}")
if(WIN32)
......@@ -56,6 +62,7 @@ ExternalProject_Add(${proj}
-DBUILD_TESTING:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
${CMAKE_PROJECT_INCLUDE_EXTERNAL_PROJECT_ARG}
-DTeem_USE_LIB_INSTALL_SUBDIR:BOOL=ON
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-DTeem_PTHREAD:BOOL=OFF
......
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