[cmake-developers] new cpack tests
Brad King
brad.king at kitware.com
Fri Apr 17 08:07:13 EDT 2015
On 4/16/2015 6:15 PM, Domen Vrankar wrote:
> I'm not certain that trying to squeeze the tests described above into
> RunCMake is the right way to go.
[snip]
> Would it be OK if I add something like CPackSemanticTests (I'm bad
> with names) into Tests directory and implement it similarly to
> RunCMake tests?
The "RunCMake" infrastructure was originally created to "run cmake"
and check results. It has evolved to run just about anything and
check the results.
One should be able to build "RunCPack" test infrastructure on top
of RunCMake, similar to Tests/RunCMake/RunCTest.cmake for CTest.
There are already several RunCMake tests that do multiple steps
with a single build tree without wiping it out after the first
step. They tend to have the boilerplate:
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Multistep-build)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
... run_cmake and run_cmake_command calls here...
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
One could probably refactor RunCMake a bit to reduce boilerplate
for these cases and re-use it for RunCPack.
-Brad
More information about the cmake-developers
mailing list