CMake/Tests/RunCMake/CPackInstallProperties/check.cmake
Nils Gladitz 15a8af21e8 Add an "installed file" property scope
Teach set_property and get_property an "INSTALL" property type to be
associated with install-tree file paths.  Make the properties available
to CPack for use during packaging.  Add a "prop_inst" Sphinx domain
object type for documentation of such properties.
2014-05-28 12:28:18 -04:00

13 lines
500 B
CMake

function(test_property FILE NAME EXPECTED_VALUE)
get_property(ACTUAL_VALUE INSTALL "${FILE}" PROPERTY "${NAME}")
if(NOT "${ACTUAL_VALUE}" STREQUAL "${EXPECTED_VALUE}")
message(FATAL_ERROR "${NAME}@${FILE}: property mismatch expected [${EXPECTED_VALUE}] actual [${ACTUAL_VALUE}] (Config:${CPACK_BUILD_CONFIG})")
endif()
endfunction()
set(CPACK_BUILD_CONFIG Debug)
include(${RunCMake_TEST_BINARY_DIR}/CPackProperties.cmake)
include(${RunCMake_TEST_BINARY_DIR}/runtest_info.cmake OPTIONAL)