[Cmake-commits] CMake branch, next, updated. v3.7.1-2127-g973ae1b
Brad King
brad.king at kitware.com
Thu Jan 12 11:51:19 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 973ae1be388c84b11b3ad57e4971f9be92f03bd8 (commit)
via 0362c60fe5f4e7e4011f14dc2519ffb1bc6c8ce8 (commit)
via 577f721fb70bbf6c29c40d5f10d4319370ccb1f8 (commit)
from 5a1cd30ba35674baad81b42970528fb6e2c83f14 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=973ae1be388c84b11b3ad57e4971f9be92f03bd8
commit 973ae1be388c84b11b3ad57e4971f9be92f03bd8
Merge: 5a1cd30 0362c60
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 12 11:51:19 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 12 11:51:19 2017 -0500
Merge topic 'vs15-detect-from-installer' into next
0362c60f cmVSSetupHelper: Simplify use of EnumerateAndChooseVSInstance
577f721f VS: Fix detection of VS 2017 installation with WindowsStore
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0362c60fe5f4e7e4011f14dc2519ffb1bc6c8ce8
commit 0362c60fe5f4e7e4011f14dc2519ffb1bc6c8ce8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 12 11:29:06 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 12 11:32:44 2017 -0500
cmVSSetupHelper: Simplify use of EnumerateAndChooseVSInstance
This method short-circuits when an instance has already been chosen, so
avoid duplicating this check at call sites.
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index 2091b5c..c2ff664 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -73,44 +73,19 @@ cmVSSetupAPIHelper::~cmVSSetupAPIHelper()
bool cmVSSetupAPIHelper::IsVS2017Installed()
{
- bool ret = false;
- if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) {
- ret = EnumerateAndChooseVSInstance();
- } else {
- ret = true;
- }
-
- return ret;
+ return this->EnumerateAndChooseVSInstance();
}
bool cmVSSetupAPIHelper::IsWin10SDKInstalled()
{
- bool isWin10SDKInstalled = false;
- if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) {
- if (EnumerateAndChooseVSInstance() &&
- chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) {
- isWin10SDKInstalled = chosenInstanceInfo.IsWin10SDKInstalled;
- }
- } else {
- isWin10SDKInstalled = chosenInstanceInfo.IsWin10SDKInstalled;
- }
-
- return isWin10SDKInstalled;
+ return (this->EnumerateAndChooseVSInstance() &&
+ chosenInstanceInfo.IsWin10SDKInstalled);
}
bool cmVSSetupAPIHelper::IsWin81SDKInstalled()
{
- bool isWin81SDKInstalled = false;
- if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) {
- if (EnumerateAndChooseVSInstance() &&
- chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) {
- isWin81SDKInstalled = chosenInstanceInfo.IsWin81SDKInstalled;
- }
- } else {
- isWin81SDKInstalled = chosenInstanceInfo.IsWin81SDKInstalled;
- }
-
- return isWin81SDKInstalled;
+ return (this->EnumerateAndChooseVSInstance() &&
+ chosenInstanceInfo.IsWin81SDKInstalled);
}
bool cmVSSetupAPIHelper::CheckInstalledComponent(
@@ -243,18 +218,12 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo(
bool cmVSSetupAPIHelper::GetVSInstanceInfo(std::string& vsInstallLocation)
{
vsInstallLocation = "";
- bool isInstalled = false;
-
- if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) {
- isInstalled = EnumerateAndChooseVSInstance();
- }
+ bool isInstalled = this->EnumerateAndChooseVSInstance();
- // Enumerate and choose best VS instance
- if (chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) {
+ if (isInstalled) {
std::string str(chosenInstanceInfo.VSInstallLocation.begin(),
chosenInstanceInfo.VSInstallLocation.end());
vsInstallLocation = str;
- isInstalled = true;
}
return isInstalled;
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=577f721fb70bbf6c29c40d5f10d4319370ccb1f8
commit 577f721fb70bbf6c29c40d5f10d4319370ccb1f8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 12 11:25:14 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 12 11:29:35 2017 -0500
VS: Fix detection of VS 2017 installation with WindowsStore
Fix logic in cmVSSetupAPIHelper::IsVS2017Installed to work correctly on
repeat calls.
Closes: #16549
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index d675a2c..2091b5c 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -76,6 +76,8 @@ bool cmVSSetupAPIHelper::IsVS2017Installed()
bool ret = false;
if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) {
ret = EnumerateAndChooseVSInstance();
+ } else {
+ ret = true;
}
return ret;
-----------------------------------------------------------------------
Summary of changes:
Source/cmVSSetupHelper.cxx | 43 +++++++------------------------------------
1 file changed, 7 insertions(+), 36 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list