[CMake] Automated packaging
Eric Noulard
eric.noulard at gmail.com
Thu Oct 15 03:38:36 EDT 2009
2009/10/15 Dixon, Shane <Shane.Dixon at atmel.com>:
> Ok, I got this working, but the only way I could get it to work is to use the configure_file. For some reason using the execute_process in ctest doesn't like the "-D" options. Maybe I did something wrong? Here's what worked:
>
> CopyToArchive.cmake.in:
>
> include(CPackConfig.cmake)
>
> EXECUTE_PROCESS(
> WORKING_DIRECTORY "@CTEST_BINARY_DIRECTORY@"
> COMMAND @CTEST_CMAKE_COMMAND@}
> -E echo "CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}" )
>
> EXECUTE_PROCESS(
> WORKING_DIRECTORY "@CTEST_BINARY_DIRECTORY@"
> COMMAND @CTEST_CMAKE_COMMAND@
> -E copy ${CPACK_PACKAGE_FILE_NAME}.exe @PACKAGE_ARCHIVE@
> RESULT_VARIABLE copy_result )
>
> Here's the call:
>
> CONFIGURE_FILE(
> "${CTEST_SOURCE_DIRECTORY}/cmake/CopyToArchive.cmake.in"
> "${CTEST_BINARY_DIRECTORY}/cmake/CopyToArchive.cmake"
> IMMEDIATE @ONLY)
>
> EXECUTE_PROCESS(
> WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
> COMMAND ${CTEST_CMAKE_COMMAND}
> -P ${CTEST_BINARY_DIRECTORY}/cmake/CopyToArchive.cmake
> RESULT_VARIABLE copy_result )
>
>
> Any reason why the -D options may not work when calling Cmake in this fashion?
Sincerely I don't know.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list