----- Original Message -----
> I need to implement a "test" that does an installation of my project into a
> location and then check that all the files indeed got installed or if there
> are any errors during the installation. Is there a "best practice" way of
> achieving this with CMake? Does CMake itself do something like this in their
> own test suite?
>
I'm not sure if there is a best practice for this, but I make a test like this:
add_test(package ${CMAKE_CPACK_COMMAND} -V -C \${CTEST_CONFIGURATION_TYPE}
--config "${CMAKE_BINARY_DIR}/CPackConfig.cmake")
With it being verbose (-V), I can get extra information to show up on cdash in
case there are problems.
I also have additional install commands
install(CODE/SCRIPT ...)
to check if the installation is OK. That includes things like BundleUtilities,
and a test run of the program.
Clint
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake