[CMake] Question about Project.xml file when using subprojects

Zou, Di (Cont, ARL/CISD) di.zou at us.army.mil
Wed Mar 9 09:38:04 EST 2011


It's all working now. Thank you!


-----Original Message-----
From: David Cole [mailto:david.cole at kitware.com]
Sent: Tue 3/8/2011 10:52 AM
To: Zou, Di (Cont, ARL/CISD)
Cc: cmake at cmake.org
Subject: Re: [CMake] Question about Project.xml file when using subprojects
 
You need to postpone calling ctest_submit until *after* you call
ctest_start. Move that call down, and it should be good.


On Tue, Mar 8, 2011 at 8:59 AM, Zou, Di (Cont, ARL/CISD) <di.zou at us.army.mil
> wrote:

> Yes. I am calling ctest_start(Nightly). Here is my entire CTest script:
>
> SET(CTEST_SITE $ENV{HOSTNAME})
> SET(MODE "Nightly")
> SET(CTEST_SOURCE_DIRECTORY "$ENV{HOME}/$ENV{NIGHTLY_SOURCE}")
> SET(CTEST_BINARY_DIRECTORY "$ENV{HOME}/$ENV{NIGHTLY_BUILD}")
> SET(CTEST_INSTALL_DIRECTORY "$ENV{NIGHTLY_INSTALL}")
> SET(CTEST_COMMAND ${CMAKE_CTEST_COMMAND})
> SET(CTEST_BUILD_NAME $ENV{BUILD_NAME})
> SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")
>
> ctest_submit(FILES "${CTEST_BINARY_DIRECTORY}/Project.xml")
>
> find_program(CTEST_GIT_COMMAND NAMES git)
>
> SET(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
> SET(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -C
> $ENV{NIGHTLY_CONFIG_DIR}/$ENV{CONFIG_NAME}")
> SET(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND}
> \"-G${CTEST_CMAKE_GENERATOR}\"")
> SET(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND}
> \"${CTEST_SOURCE_DIRECTORY}\"")
>
> SET(CTEST_BUILD_TARGET "install")
> #CTEST_EMPTY_BINARY_DIRECTORY("${CTEST_BINARY_DIRECTORY}")
>
> #include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
> #MESSAGE("sub ${CTEST_PROJECT_SUBPROJECTS}")
>
> SET(SUBPROJECT "$ENV{SUBPROJECT}")
>
> set_property(GLOBAL PROPERTY SubProject ${SUBPROJECT})
> set_property(GLOBAL PROPERTY Label ${SUBPROJECT})
>
> ctest_start(${MODE})
> ctest_update()
> ctest_configure()
> ctest_submit(PARTS Update Configure)
> ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
> ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
> ctest_submit()
>
> Lockheed Martin / ARL CISD
> Aberdeen Proving Ground, MD 21005
> Phone: 410-278-7751
> Email: di.zou at us.army.mil
>
>
>
> -----Original Message-----
> From: David Cole [mailto:david.cole at kitware.com]
> Sent: Mon 3/7/2011 7:12 PM
> To: Zou, Di (Cont, ARL/CISD)
> Cc: cmake at cmake.org
> Subject: Re: [CMake] Question about Project.xml file when using subprojects
>
> Are you calling ctest_start(Experimental) or ctest_start(Nightly) before
> callng ctest_submit...?
>
>
> On Mon, Mar 7, 2011 at 4:32 PM, Zou, Di (Cont, ARL/CISD) <
> di.zou at us.army.mil
> > wrote:
>
> > I have been looking at this webpage:
> > http://www.kitware.com/products/html/CDashSubprojects.html. I have
> created
> > a Project.xml file to list my subprojects. Right now I am just trying to
> use
> > Project.xml to add subprojects to a dashboard. I am trying to submit the
> > file to the dashboard like so:
> >
> > #Stuff
> > ctest_submit(FILES "${CTEST_BINARY_DIRECTORY}/Project.xml")
> > #Stuff
> >
> > ctest_update()
> > ctest_configure()
> > ctest_submit(PARTS Update Configure)
> > ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
> > ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
> >
> > I am getting this error:
> > Cannot create directory /Testing/Temporary
> > Cannot create log file: LastSubmit.log
> >   Error when uploading file: /home/dizou/build_dir/Project.xml
> >   Error message was: Couldn't resolve host ''
> >   Problems when submitting via HTTP
> >
> > If I comment out "ctest_submit(FILES
> > "${CTEST_BINARY_DIRECTORY}/Project.xml")", everything gets submitted to
> the
> > dashboard ok.
> > Am I putting Project.xml in the wrong directory? Should I be putting the
> > command in a seperate script?
> >
> > Thanks for the help.
> >
> > Lockheed Martin / ARL CISD
> > Aberdeen Proving Ground, MD 21005
> > Phone: 410-278-7751
> > Email: di.zou at us.army.mil
> >
> > _______________________________________________
> > 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