From 5643121decda9aac3906291268fe71fab1daef60 Mon Sep 17 00:00:00 2001 From: Qin Zhao Date: Tue, 13 Oct 2015 18:43:54 -0400 Subject: [PATCH] i#1791 DynamoRIO build failure on WinXP bot: update get_visualstudio_info - VS2010 on WinXP may store the regkey "ProductDir" in a different registry path. Update get_visualstudio_info to handle the alternative path. Fixes #1791 Review-URL: https://codereview.appspot.com/266330044 --- suite/lookup_visualstudio.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/suite/lookup_visualstudio.cmake b/suite/lookup_visualstudio.cmake index d4c4ca4b0c4..56e3fe9d18e 100644 --- a/suite/lookup_visualstudio.cmake +++ b/suite/lookup_visualstudio.cmake @@ -57,7 +57,11 @@ function(get_visualstudio_info vs_dir_out vs_version_out vs_generator_out) endif() get_filename_component(${vs_dir_out} [HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\VisualStudio\\10.0_Config\\Setup\\VS;ProductDir] REALPATH) if ("${vs_dir_out}" MATCHES "/registry$") - # on failure we get "/registry" + # Visual Studio 2010 may store the regkey "ProductDir" in a different + # registry path. + get_filename_component(${vs_dir_out} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir] REALPATH) + endif () + if ("${vs_dir_out}" MATCHES "/registry$") set(${vs_version_out} "NOTFOUND" PARENT_SCOPE) else () set(${vs_version_out} "10.0" PARENT_SCOPE)