Merge topic 'cpack-config-generation-test'

674dc0b3 CPack generator independent tests
This commit is contained in:
Brad King 2015-08-31 09:48:32 -04:00 committed by CMake Topic Stage
commit 5f6718c003
6 changed files with 21 additions and 0 deletions

View File

@ -239,6 +239,7 @@ add_RunCMake_test(CommandLine)
add_RunCMake_test(CommandLineTar) add_RunCMake_test(CommandLineTar)
add_RunCMake_test(install) add_RunCMake_test(install)
add_RunCMake_test(CPackConfig)
add_RunCMake_test(CPackInstallProperties) add_RunCMake_test(CPackInstallProperties)
add_RunCMake_test(ExternalProject) add_RunCMake_test(ExternalProject)
add_RunCMake_test(CTestCommandLine) add_RunCMake_test(CTestCommandLine)

View File

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
include(CPack)

View File

@ -0,0 +1,3 @@
include(RunCMake)
run_cmake(Simple)

View File

@ -0,0 +1,3 @@
include(${RunCMake_SOURCE_DIR}/check.cmake)
test_variable(CPACK_FOO "bar baz;quux")

View File

@ -0,0 +1 @@
set(CPACK_FOO "bar baz;quux")

View File

@ -0,0 +1,7 @@
function(test_variable NAME EXPECTED_VALUE)
if(NOT "${${NAME}}" STREQUAL "${EXPECTED_VALUE}")
message(FATAL_ERROR "${NAME}: variable mismatch; expected [${EXPECTED_VALUE}] actual [${${NAME}}]")
endif()
endfunction()
include(${RunCMake_TEST_BINARY_DIR}/CPackConfig.cmake)