install(EXPORT): Improve target import failure message format

This commit is contained in:
Brad King 2011-11-17 16:39:24 -05:00
parent a2be068c75
commit 5c03438661
1 changed files with 10 additions and 13 deletions

View File

@ -385,19 +385,16 @@ cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream& os)
"FOREACH(target ${_IMPORT_CHECK_TARGETS} )\n" "FOREACH(target ${_IMPORT_CHECK_TARGETS} )\n"
" FOREACH(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n" " FOREACH(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n"
" IF(NOT EXISTS \"${file}\" )\n" " IF(NOT EXISTS \"${file}\" )\n"
" MESSAGE(FATAL_ERROR \"The imported target \\\"${target}\\\" " " MESSAGE(FATAL_ERROR \"The imported target \\\"${target}\\\""
"references the file \\\"${file}\\\", but this file does not exist. " " references the file\n"
"There are multiple possible reasons:\n" " \\\"${file}\\\"\n"
" * The file \\\"${file}\\\" has been manually " "but this file does not exist. Possible reasons include:\n"
"deleted, renamed or moved to another location.\n" "* The file was deleted, renamed, or moved to another location.\n"
" * A previous install or uninstall procedure did not complete " "* An install or uninstall procedure did not complete successfully.\n"
" successfully.\n" "* The installation package was faulty and contained\n"
" * The installation package was faulty, and contained\n" " \\\"${CMAKE_CURRENT_LIST_FILE}\\\"\n"
"\\\"${CMAKE_CURRENT_LIST_FILE}\\\"\n" "but not all the files it references.\n"
"but not\n" "\")\n"
"\\\"${file}\\\"\n"
"which must always be installed together.\\n\"\n"
" )\n"
" ENDIF()\n" " ENDIF()\n"
" ENDFOREACH()\n" " ENDFOREACH()\n"
" UNSET(_IMPORT_CHECK_FILES_FOR_${target})\n" " UNSET(_IMPORT_CHECK_FILES_FOR_${target})\n"