diff options
author | Brad King <brad.king@kitware.com> | 2017-03-28 14:14:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-03-28 14:14:59 (GMT) |
commit | 83199f8daf13328a4fb97c16476c3a0da4228ead (patch) | |
tree | 68bda02d87692a48e2c1989d118ba005d4701039 /Source | |
parent | 4d970868489e7a7a45419ad74444afe2ab8239ee (diff) | |
parent | 6eb609fd59d989fede93fadfc67b928ee7ab7fc2 (diff) | |
download | CMake-83199f8daf13328a4fb97c16476c3a0da4228ead.zip CMake-83199f8daf13328a4fb97c16476c3a0da4228ead.tar.gz CMake-83199f8daf13328a4fb97c16476c3a0da4228ead.tar.bz2 |
Merge topic 'InstallRequiredSystemLibraries-vs2017'
6eb609fd InstallRequiredSystemLibraries: Find VS 2017 redist directory
cf784d9f Add undocumented CMake language means to find VS 2017
082c0375 InstallRequiredSystemLibraries: Split VS 2017 search paths
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !632
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCMakeHostSystemInformationCommand.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 7da93ac..e135ac6 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -7,6 +7,12 @@ #include "cmMakefile.h" #include "cmsys/SystemInformation.hxx" +#if defined(_WIN32) +#include "cmSystemTools.h" +#include "cmVSSetupHelper.h" +#define HAVE_VS_SETUP_HELPER +#endif + class cmExecutionStatus; // cmCMakeHostSystemInformation @@ -70,6 +76,13 @@ bool cmCMakeHostSystemInformationCommand::GetValue( value = this->ValueToString(info.GetTotalPhysicalMemory()); } else if (key == "AVAILABLE_PHYSICAL_MEMORY") { value = this->ValueToString(info.GetAvailablePhysicalMemory()); +#ifdef HAVE_VS_SETUP_HELPER + } else if (key == "VS_15_DIR") { + cmVSSetupAPIHelper vsSetupAPIHelper; + if (vsSetupAPIHelper.GetVSInstanceInfo(value)) { + cmSystemTools::ConvertToUnixSlashes(value); + } +#endif } else { std::string e = "does not recognize <key> " + key; this->SetError(e); |