Skip to content

Commit

Permalink
i#1791 DynamoRIO build failure on WinXP bot: update get_visualstudio_…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
zhaoqin committed Oct 14, 2015
1 parent 86f1a81 commit 5643121
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion suite/lookup_visualstudio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5643121

Please sign in to comment.