[CMake] CTest Submission to CDash on MSVC

Michael Jackson mike.jackson at bluequartz.net
Mon Nov 23 15:43:33 EST 2009


What is the "accepted" setup to run a CTest with CDash submission on  
Windows using Visual Studio tools?
I tried writing a "Hdf5Dashboard.cmake" file with some basics in it:

cmake_minimum_required ( VERSION 2.6 )

set (CTEST_SITE "VS2008 at bluequartz.net")
set (CTEST_BUILD_NAME "Debug-Visual Studio 2008 DLL")

get_filename_component(CTEST_DASHBOARD_ROOT "$ 
{CTEST_SCRIPT_DIRECTORY}/.." ABSOLUTE)
set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/hdf5-v18")
set (CTEST_BINARY_DIRECTORY ${CTEST_SOURCE_DIRECTORY}/Build)
set (CTEST_UPDATE_COMMAND "/usr/local/git/bin/git")
set (CTEST_CMAKE_GENERATOR "Visual Studio 9 2008")
#set (CTEST_NOTES_FILES
#  ${CTEST_DASHBOARD_ROOT}/DashBoards/Hdf5V18Dashboard.cmake /tmp/ 
Hdf5DashBoardNotes-GCC.txt
#)
# set (CTEST_BUILD_COMMAND     "/usr/bin/make -j16")
# set (CTEST_BUILD_FLAGS "-j16")
set (CTEST_BUILD_CONFIGURATION "Debug")
set (CTEST_TIMEOUT "10")

SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
#SET (CTEST_UPDATE_OPTIONS "pull origin")
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})

ctest_start (Experimental)
#ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")

file (WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
"
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 9 2008
SITE:STRING=${CTEST_SITE}
BUILDNAME:STRING=${CTEST_BUILD_NAME}
CMAKE_BUILD_TYPE:STRING=Debug
BUILD_SHARED_LIBS:BOOL=ON
BUILD_TESTING:BOOL=ON
"
)
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}")
ctest_test (BUILD "${CMAKE_CFG_INTDIR}")
ctest_submit ()
# +++++++++++++++++++++++++ END +++++++++++++++++++++++++++++++

and then trying to launch it with "ctest -S hdf5Dashboard.cmake -V"  
which goes for a bit but seems to mess up late in the "configuration"  
stage or just when compilation starts, not sure.

  Where are the log files kept for this?
  If I open the solution file that is generated then the project will  
not build correctly. If I do everything manually (ie, like I normally  
would) then the project builds OK and the expected tests pass.

   Any help would be appreciated.

http://my.cdash.org/index.php?project=hdf5-v18#

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio



More information about the CMake mailing list