summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPackRPM/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CPackRPM/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CPackRPM/RunCMakeTest.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPackRPM/RunCMakeTest.cmake b/Tests/RunCMake/CPackRPM/RunCMakeTest.cmake
new file mode 100644
index 0000000..1935e32
--- /dev/null
+++ b/Tests/RunCMake/CPackRPM/RunCMakeTest.cmake
@@ -0,0 +1,17 @@
+include(RunCMake)
+
+function(run_cpack_rpm_test TEST_NAME)
+ set(RunCMake_TEST_NO_CLEAN TRUE)
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ execute_process(
+ COMMAND "${CMAKE_COMMAND}" -D RunCMake_TEST=${TEST_NAME} "${RunCMake_SOURCE_DIR}"
+ WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
+ run_cmake_command(${TEST_NAME} ${CMAKE_CPACK_COMMAND})
+endfunction()
+
+run_cpack_rpm_test(CPackRPM_PARTIALLY_RELOCATABLE_WARNING)