Allow this to handle hand edited manifest files.
This commit is contained in:
parent
23bdb28cad
commit
b3328f7766
|
@ -36,7 +36,7 @@
|
||||||
# it will put the list of versions found into the variable
|
# it will put the list of versions found into the variable
|
||||||
# specified by list_var
|
# specified by list_var
|
||||||
function(crt_version file 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})
|
foreach(s ${strings})
|
||||||
set(has_match 1)
|
set(has_match 1)
|
||||||
string(REGEX
|
string(REGEX
|
||||||
|
@ -89,6 +89,10 @@ file(GLOB_RECURSE manifest_files "*.manifest")
|
||||||
foreach(f ${manifest_files})
|
foreach(f ${manifest_files})
|
||||||
crt_version("${f}" manifest_version_list)
|
crt_version("${f}" manifest_version_list)
|
||||||
endforeach(f)
|
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}")
|
message("Versions found in ${manifest_files}: ${manifest_version_list}")
|
||||||
if(DEFINED allow_versions)
|
if(DEFINED allow_versions)
|
||||||
message("Extra versions allowed: ${allow_versions}")
|
message("Extra versions allowed: ${allow_versions}")
|
||||||
|
|
Loading…
Reference in New Issue