Warning, /frameworks/extra-cmake-modules/tests/ECMConfiguredInstallTest/check_tree.cmake.in is written in an unsupported language. File is not indexed.
0001 set(EXPECTED "@CMAKE_CURRENT_SOURCE_DIR@/expected")
0002 set(ACTUAL "@CMAKE_INSTALL_PREFIX@")
0003
0004 # Compares files in two directories, emits a fatal error if the top level files are different
0005 # Takes a directory of expected files, and a directory of output files
0006 function(compare_dirs expected output )
0007 file(GLOB files "${expected}/*")
0008 foreach(file ${files})
0009 get_filename_component(name ${file} NAME)
0010
0011 execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files ${file} "${output}/${name}"
0012 RESULT_VARIABLE test_result
0013 )
0014 If (NOT test_result EQUAL 0)
0015 message(FATAL_ERROR "Test failed: ${file} doesn't match ${output}/${name}!")
0016 endif()
0017 endforeach()
0018 endfunction()
0019
0020 compare_dirs(${EXPECTED} ${ACTUAL}/test )