From 4f9c61eb205c1ef1b26c775c57cd6e978c5c3457 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Fri, 5 Oct 2012 10:13:13 -0400 Subject: [PATCH] Fix CDash warnings/errors reporting for unix-like 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 See #242 --- CMake/ctkDashboardDriverScript.cmake | 6 +----- CMakeExternals/DCMTK.cmake | 7 +++++++ CMakeExternals/ITK.cmake | 7 +++++++ CMakeExternals/OpenIGTLink.cmake | 7 +++++++ CMakeExternals/PythonQt.cmake | 2 +- CMakeExternals/PythonQtGenerator.cmake | 2 +- CMakeExternals/QtSOAP.cmake | 2 +- CMakeExternals/qxmlrpc.cmake | 13 ++++++++----- SuperBuild.cmake | 1 - 9 files changed, 33 insertions(+), 14 deletions(-) diff --git a/CMake/ctkDashboardDriverScript.cmake b/CMake/ctkDashboardDriverScript.cmake index f3fcf443b3..cff1ab44c1 100644 --- a/CMake/ctkDashboardDriverScript.cmake +++ b/CMake/ctkDashboardDriverScript.cmake @@ -97,10 +97,7 @@ endif() #message("force_build:${force_build}") # For more details, see http://www.kitware.com/blog/home/post/11 -set(CTEST_USE_LAUNCHERS 0) -#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 !") @@ -127,7 +124,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} SUPERBUILD_EXCLUDE_CTKBUILD_TARGET:BOOL=TRUE WITH_COVERAGE:BOOL=${WITH_COVERAGE} diff --git a/CMakeExternals/DCMTK.cmake b/CMakeExternals/DCMTK.cmake index 55dc9326c1..8ea743dc78 100644 --- a/CMakeExternals/DCMTK.cmake +++ b/CMakeExternals/DCMTK.cmake @@ -38,6 +38,12 @@ if(${add_project}) set(location_args GIT_REPOSITORY "${git_protocol}://git.dcmtk.org/dcmtk.git" GIT_TAG ${revision_tag}) endif() + + set(ep_project_include_arg) + if(CTEST_USE_LAUNCHERS) + set(ep_project_include_arg + "-DCMAKE_PROJECT_DCMTK_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake") + endif() #message(STATUS "Adding project:${proj}") ExternalProject_Add(${proj} @@ -53,6 +59,7 @@ if(${add_project}) -DDCMTK_INSTALL_LIBDIR:STRING=lib/${CMAKE_CFG_INTDIR} CMAKE_CACHE_ARGS ${ep_common_cache_args} + ${ep_project_include_arg} -DBUILD_SHARED_LIBS:BOOL=OFF -DDCMTK_WITH_DOXYGEN:BOOL=OFF -DDCMTK_WITH_ZLIB:BOOL=OFF # see github issue #25 diff --git a/CMakeExternals/ITK.cmake b/CMakeExternals/ITK.cmake index 5de6fcd18f..588f8a9f3e 100644 --- a/CMakeExternals/ITK.cmake +++ b/CMakeExternals/ITK.cmake @@ -38,6 +38,12 @@ if(${add_project}) set(location_args GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git" GIT_TAG ${revision_tag}) endif() + + set(ep_project_include_arg) + if(CTEST_USE_LAUNCHERS) + set(ep_project_include_arg + "-DCMAKE_PROJECT_ITK_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake") + endif() # message(STATUS "Adding project:${proj}") ExternalProject_Add(${proj} @@ -50,6 +56,7 @@ if(${add_project}) CMAKE_GENERATOR ${gen} CMAKE_CACHE_ARGS ${ep_common_cache_args} + ${ep_project_include_arg} -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON -DITK_USE_REVIEW:BOOL=ON diff --git a/CMakeExternals/OpenIGTLink.cmake b/CMakeExternals/OpenIGTLink.cmake index 67fbf65b51..dc1387bcb9 100644 --- a/CMakeExternals/OpenIGTLink.cmake +++ b/CMakeExternals/OpenIGTLink.cmake @@ -31,6 +31,12 @@ if(${add_project}) else() set(location_args SVN_REPOSITORY "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink") endif() + + set(ep_project_include_arg) + if(CTEST_USE_LAUNCHERS) + set(ep_project_include_arg + "-DCMAKE_PROJECT_OpenIGTLink_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake") + endif() # message(STATUS "Adding project:${proj}") ExternalProject_Add(${proj} @@ -42,6 +48,7 @@ if(${add_project}) CMAKE_GENERATOR ${gen} CMAKE_CACHE_ARGS ${ep_common_cache_args} + ${ep_project_include_arg} DEPENDS ${proj_DEPENDENCIES} ) diff --git a/CMakeExternals/PythonQt.cmake b/CMakeExternals/PythonQt.cmake index d5fa33b9db..debbffd23e 100644 --- a/CMakeExternals/PythonQt.cmake +++ b/CMakeExternals/PythonQt.cmake @@ -53,7 +53,7 @@ if(${add_project}) message(FATAL_ERROR "error: Python is required to build ${PROJECT_NAME}") endif() - set(revision_tag 6366f002a93aa238c55f58de949d09c552cda5a9) + set(revision_tag 2114405a47836b3fb16a3f66fec6a02184f32e71) if(${proj}_REVISION_TAG) set(revision_tag ${${proj}_REVISION_TAG}) endif() diff --git a/CMakeExternals/PythonQtGenerator.cmake b/CMakeExternals/PythonQtGenerator.cmake index 808bb23e7a..c0d0a6c875 100644 --- a/CMakeExternals/PythonQtGenerator.cmake +++ b/CMakeExternals/PythonQtGenerator.cmake @@ -52,7 +52,7 @@ if(CTK_WRAP_PYTHONQT_FULL) ) else() - set(revision_tag 3171a94e16ba9bfee137) + set(revision_tag 2114405a47836b3fb16a3f66fec6a02184f32e71) if(${proj}_REVISION_TAG) set(revision_tag ${${proj}_REVISION_TAG}) endif() diff --git a/CMakeExternals/QtSOAP.cmake b/CMakeExternals/QtSOAP.cmake index 6a24f13abc..fd1f1afb42 100644 --- a/CMakeExternals/QtSOAP.cmake +++ b/CMakeExternals/QtSOAP.cmake @@ -25,7 +25,7 @@ if(${add_project}) if(NOT DEFINED QtSOAP_DIR) - set(revision_tag 6bf1b8c8) + set(revision_tag 3e49f7a4a1a684779eb66215bad46140d9153731) if(${proj}_REVISION_TAG) set(revision_tag ${${proj}_REVISION_TAG}) endif() diff --git a/CMakeExternals/qxmlrpc.cmake b/CMakeExternals/qxmlrpc.cmake index ceae9806f9..e4c731a642 100644 --- a/CMakeExternals/qxmlrpc.cmake +++ b/CMakeExternals/qxmlrpc.cmake @@ -25,17 +25,20 @@ if(${add_project}) if(NOT DEFINED qxmlrpc_DIR) + set(revision_tag 1d46d0e24d68049e726269dd3c6438671cd693ea) + if(${proj}_REVISION_TAG) + set(revision_tag ${${proj}_REVISION_TAG}) + endif() + set(location_args ) if(${proj}_URL) set(location_args URL ${${proj}_URL}) elseif(${proj}_GIT_REPOSITORY) - set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}) - if(${proj}_REVISION_TAG) - list(APPEND location_args GIT_TAG ${${proj}_REVISION_TAG}) - endif() + set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY} + GIT_TAG ${revision_tag}) else() set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/qxmlrpc.git" - GIT_TAG "origin/patched") + GIT_TAG ${revision_tag}) endif() #message(STATUS "Adding project:${proj}") diff --git a/SuperBuild.cmake b/SuperBuild.cmake index a23e8aaf10..519a6580ac 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -81,7 +81,6 @@ set(ctk_cmake_boolean_args CTK_USE_KWSTYLE WITH_COVERAGE DOCUMENTATION_TARGET_IN_ALL - CTEST_USE_LAUNCHERS CTK_WRAP_PYTHONQT_FULL CTK_ENABLE_Python_Wrapping ${ctk_lib_options_list}