[CMake] CTest Submission to CDash on MSVC

Clinton Stimpson clinton at elemtech.com
Mon Nov 23 15:52:52 EST 2009


You might need a 
SET(CTEST_PROJECT_NAME foo)
if you have a foo.sln file you want it to build.

For makefiles I set the project name to "all"

I think ctest -VV will show the command used to build the visual studio 
project.

And for the CMakeCache.txt, you should need to set the generator, or set 
CMAKE_BUILD_TYPE for generators that support build configurations such as 
Visual Studio.

Clint

On Monday 23 November 2009 01:43:33 pm Michael Jackson wrote:
> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list