diff options
author | Brad King <brad.king@kitware.com> | 2014-09-29 20:26:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-09-29 20:26:07 (GMT) |
commit | cb9e86706c4de9ddc39dabbf2ccf3daa9ee4d189 (patch) | |
tree | 9259987f92c05613b8d0d440f85415c61abe1268 /Tests/CMakeLists.txt | |
parent | a22570ea19904b08afae204f378c6f5febd7f534 (diff) | |
parent | c655f0c417f66096a62bb837e163ec636665dd69 (diff) | |
download | CMake-cb9e86706c4de9ddc39dabbf2ccf3daa9ee4d189.zip CMake-cb9e86706c4de9ddc39dabbf2ccf3daa9ee4d189.tar.gz CMake-cb9e86706c4de9ddc39dabbf2ccf3daa9ee4d189.tar.bz2 |
Merge topic 'vs-minor-cleanups'
c655f0c4 VS: Drop GenerateManifest from .vcxproj files for non-MS tools
227a3367 VS: Use case-insensitive check for hlsl,jpg,png,xml file extensions
4a24015a Tests: Always detect VS and SDK availability on Windows
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index f27949a..49e63f1 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1780,6 +1780,23 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() endif() + if(WIN32) + set(reg_vs11 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;InstallDir]") + set(reg_vs12 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;InstallDir]") + set(reg_ws80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]") + set(reg_ws81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]") + set(reg_wp80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]") + set(reg_wp81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]") + foreach(reg vs11 vs12 ws80 ws81 wp80 wp81) + get_filename_component(r "${reg_${reg}}" ABSOLUTE) + if(IS_DIRECTORY "${r}") + set(${reg} 1) + else() + set(${reg} 0) + endif() + endforeach() + endif() + get_filename_component(ntver "[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion;CurrentVersion]" NAME) if(WIN32 AND ntver VERSION_GREATER 6.1) # Windows >= 8.0 macro(add_test_VSWinStorePhone name generator systemName systemVersion) @@ -1796,20 +1813,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSWinStorePhone/${name}") endmacro() - set(reg_vs11 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;InstallDir]") - set(reg_vs12 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;InstallDir]") - set(reg_ws80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]") - set(reg_ws81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]") - set(reg_wp80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]") - set(reg_wp81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]") - foreach(reg vs11 vs12 ws80 ws81 wp80 wp81) - get_filename_component(r "${reg_${reg}}" ABSOLUTE) - if(IS_DIRECTORY "${r}") - set(${reg} 1) - else() - set(${reg} 0) - endif() - endforeach() if(vs11 AND ws80) add_test_VSWinStorePhone(vs11-store80-X86 "Visual Studio 11 2012" WindowsStore 8.0) add_test_VSWinStorePhone(vs11-store80-ARM "Visual Studio 11 2012 ARM" WindowsStore 8.0) |