mirror of
https://github.com/reactos/CMake.git
synced 2024-12-15 15:48:52 +00:00
CPack generator independent tests
CPackConfig.cmake file generation from CMake test suite. Currently it contains only a simple test without special characters in variable value. Test is not part of RunCMake/CPack as those tests are expected to be run for a specified generator.
This commit is contained in:
parent
33df7f36d0
commit
674dc0b335
@ -239,6 +239,7 @@ add_RunCMake_test(CommandLine)
|
||||
add_RunCMake_test(CommandLineTar)
|
||||
|
||||
add_RunCMake_test(install)
|
||||
add_RunCMake_test(CPackConfig)
|
||||
add_RunCMake_test(CPackInstallProperties)
|
||||
add_RunCMake_test(ExternalProject)
|
||||
add_RunCMake_test(CTestCommandLine)
|
||||
|
6
Tests/RunCMake/CPackConfig/CMakeLists.txt
Normal file
6
Tests/RunCMake/CPackConfig/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
project(${RunCMake_TEST})
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
include(CPack)
|
3
Tests/RunCMake/CPackConfig/RunCMakeTest.cmake
Normal file
3
Tests/RunCMake/CPackConfig/RunCMakeTest.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(Simple)
|
3
Tests/RunCMake/CPackConfig/Simple-check.cmake
Normal file
3
Tests/RunCMake/CPackConfig/Simple-check.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
include(${RunCMake_SOURCE_DIR}/check.cmake)
|
||||
|
||||
test_variable(CPACK_FOO "bar baz;quux")
|
1
Tests/RunCMake/CPackConfig/Simple.cmake
Normal file
1
Tests/RunCMake/CPackConfig/Simple.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(CPACK_FOO "bar baz;quux")
|
7
Tests/RunCMake/CPackConfig/check.cmake
Normal file
7
Tests/RunCMake/CPackConfig/check.cmake
Normal 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)
|
Loading…
Reference in New Issue
Block a user