Skip to content

Commit

Permalink
Fix CDash warnings/errors reporting for unix-like parallel build
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jcfr committed Oct 5, 2012
1 parent 5a04ea5 commit 4f9c61e
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 14 deletions.
6 changes: 1 addition & 5 deletions CMake/ctkDashboardDriverScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 !")
Expand All @@ -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}
Expand Down
7 changes: 7 additions & 0 deletions CMakeExternals/DCMTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions CMakeExternals/ITK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions CMakeExternals/OpenIGTLink.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -42,6 +48,7 @@ if(${add_project})
CMAKE_GENERATOR ${gen}
CMAKE_CACHE_ARGS
${ep_common_cache_args}
${ep_project_include_arg}
DEPENDS
${proj_DEPENDENCIES}
)
Expand Down
2 changes: 1 addition & 1 deletion CMakeExternals/PythonQt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion CMakeExternals/PythonQtGenerator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion CMakeExternals/QtSOAP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
13 changes: 8 additions & 5 deletions CMakeExternals/qxmlrpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
1 change: 0 additions & 1 deletion SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 4f9c61e

Please sign in to comment.