[CMake] Automated packaging
Dixon, Shane
Shane.Dixon at atmel.com
Wed Oct 14 13:50:15 EDT 2009
Clinton,
Okay, that PARTIALLY works. It does in fact build everything the way it should. The problem comes when I try to copy the file. I don't know what the product of the Cpack step is unless I have visibility to the variable CPACK_PACKAGE_FILE_NAME. I try this block:
EXECUTE_PROCESS(
WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
COMMAND ${CTEST_CMAKE_COMMAND}
-E copy ${CPACK_PACKAGE_FILE_NAME}.exe ${PACKAGE_ARCHIVE}
RESULT_VARIABLE copy_result )
And it doesn't work. I get this:
Error copying file ".exe" to "C:/temp/ctest_builds/archive".
The CPACK_PACKAGE_FILE_NAME is empty. If I try to load the CPackConfig.cmake with --config, the -E option balks and doesn't like that. Is there any way to load that variable in my script? Am I going to have to REGEX it out of the CMakeCache.txt?
--
Shane Dixon
Linux Engineer
Atmel Corporation
-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Clinton Stimpson
Sent: Tuesday, October 13, 2009 4:39 PM
To: cmake at cmake.org
Cc: Dixon, Shane
Subject: Re: [CMake] Automated packaging
You could do something like this in your ctest script:
EXECUTE_PROCESS(WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
COMMAND ${CTEST_CPACK_COMMAND}
--config ${CTEST_BINARY_DIRECTORY}/CPackConfig.cmake
RESULT_VARIABLE package_result)
You can also use EXECUTE_PROCESS to copy packages to an archive.
Clint
On Tuesday 13 October 2009 04:34:15 pm Dixon, Shane wrote:
> I have a build system that can build multiple packages. One has a
> built-in simulator and the other runs in "real" mode. I end up with 2
> NSIS packages, one ending in -emul and one ending in -real. I want to
> automate this process so that I can do this:
>
> 1. Check out from SVN
> 2. Configure (for simulation mode)
> 3. Build
> 4. Test
> 5. Package simulation version
> 6. Reconfigure (for real mode)
> 7. Test
> 8. Package real version
> 9. Copy both packages to an archive
>
> I've done a Ctest script, so I can checkout, build, test, etc., but it
> doesn't seem to let me "nmake package". How can I script these steps
> so that I can build two different variants of my program? How can I
> invoke the "nmake package". Does this even belong in a Ctest script
> or should it be elsewhere (it seems outside of the scope of Ctest)?
>
> --
> Shane Dixon
> Linux Engineer
> Atmel Corporation
> _______________________________________________
> 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
_______________________________________________
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