summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeVerifyManifest.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-10-27 20:01:47 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-10-27 20:01:47 (GMT)
commitb3328f77667456dcfe7485c722c2a74317c39f26 (patch)
tree7377ced56ac0f9de57f671d37046ae0137e2fbf7 /Modules/CMakeVerifyManifest.cmake
parent23bdb28cadcf3b9cfe474bec06e761fbe9f2d5a5 (diff)
downloadCMake-b3328f77667456dcfe7485c722c2a74317c39f26.zip
CMake-b3328f77667456dcfe7485c722c2a74317c39f26.tar.gz
CMake-b3328f77667456dcfe7485c722c2a74317c39f26.tar.bz2
Allow this to handle hand edited manifest files.
Diffstat (limited to 'Modules/CMakeVerifyManifest.cmake')
-rw-r--r--Modules/CMakeVerifyManifest.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeVerifyManifest.cmake b/Modules/CMakeVerifyManifest.cmake
index 25240c0..a42db6f 100644
--- a/Modules/CMakeVerifyManifest.cmake
+++ b/Modules/CMakeVerifyManifest.cmake
@@ -36,7 +36,7 @@
# it will put the list of versions found into the variable
# specified by list_var
function(crt_version file list_var)
- file(STRINGS "${file}" strings REGEX "Microsoft.VC...CRT")
+ file(STRINGS "${file}" strings REGEX "Microsoft.VC...CRT" NEWLINE_CONSUME)
foreach(s ${strings})
set(has_match 1)
string(REGEX
@@ -89,6 +89,10 @@ file(GLOB_RECURSE manifest_files "*.manifest")
foreach(f ${manifest_files})
crt_version("${f}" manifest_version_list)
endforeach(f)
+list(LENGTH manifest_version_list LEN)
+if(LEN EQUAL 0)
+ message(FATAL_ERROR "No .manifest files found, no version check can be done.")
+endif()
message("Versions found in ${manifest_files}: ${manifest_version_list}")
if(DEFINED allow_versions)
message("Extra versions allowed: ${allow_versions}")