1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-16 14:08:35 +08:00

Tests: Verify registry value is not "/registry" before using

Fixes: #17002
This commit is contained in:
Michael Stürmer
2017-06-21 10:44:54 +02:00
committed by Brad King
parent 782c1e2f37
commit 0db4c7a021

View File

@@ -2081,7 +2081,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set(reg_nasm "[HKEY_CURRENT_USER\\SOFTWARE\\nasm]") set(reg_nasm "[HKEY_CURRENT_USER\\SOFTWARE\\nasm]")
foreach(reg vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra nasm) foreach(reg vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra nasm)
get_filename_component(r "${reg_${reg}}" ABSOLUTE) get_filename_component(r "${reg_${reg}}" ABSOLUTE)
if(IS_DIRECTORY "${r}") if(IS_DIRECTORY "${r}" AND NOT "${r}" STREQUAL "/registry")
set(${reg} 1) set(${reg} 1)
else() else()
set(${reg} 0) set(${reg} 0)