Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
André Pedro
CMake
Commits
e9e8a5dc
Commit
e9e8a5dc
authored
8 years ago
by
Brad King
Browse files
Options
Downloads
Plain Diff
Merge branch 'vs2017-fallback-sdk' into release
parents
fe8f5b54
2da0838c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/cmGlobalVisualStudio15Generator.cxx
+34
-0
34 additions, 0 deletions
Source/cmGlobalVisualStudio15Generator.cxx
Source/cmGlobalVisualStudio15Generator.h
+4
-0
4 additions, 0 deletions
Source/cmGlobalVisualStudio15Generator.h
with
38 additions
and
0 deletions
Source/cmGlobalVisualStudio15Generator.cxx
+
34
−
0
View file @
e9e8a5dc
...
...
@@ -109,6 +109,18 @@ void cmGlobalVisualStudio15Generator::WriteSLNHeader(std::ostream& fout)
}
}
bool
cmGlobalVisualStudio15Generator
::
InitializeWindows
(
cmMakefile
*
mf
)
{
// If the Win 8.1 SDK is installed then we can select a SDK matching
// the target Windows version.
if
(
this
->
IsWin81SDKInstalled
())
{
return
cmGlobalVisualStudio14Generator
::
InitializeWindows
(
mf
);
}
// Otherwise we must choose a Win 10 SDK even if we are not targeting
// Windows 10.
return
this
->
SelectWindows10SDK
(
mf
,
false
);
}
bool
cmGlobalVisualStudio15Generator
::
SelectWindowsStoreToolset
(
std
::
string
&
toolset
)
const
{
...
...
@@ -135,6 +147,28 @@ bool cmGlobalVisualStudio15Generator::IsWindowsStoreToolsetInstalled() const
return
vsSetupAPIHelper
.
IsWin10SDKInstalled
();
}
bool
cmGlobalVisualStudio15Generator
::
IsWin81SDKInstalled
()
const
{
// Does the VS installer tool know about one?
if
(
vsSetupAPIHelper
.
IsWin81SDKInstalled
())
{
return
true
;
}
// Does the registry know about one (e.g. from VS 2015)?
std
::
string
win81Root
;
if
(
cmSystemTools
::
ReadRegistryValue
(
"HKEY_LOCAL_MACHINE
\\
SOFTWARE
\\
Microsoft
\\
"
"Windows Kits
\\
Installed Roots;KitsRoot81"
,
win81Root
,
cmSystemTools
::
KeyWOW64_32
)
||
cmSystemTools
::
ReadRegistryValue
(
"HKEY_CURRENT_USER
\\
SOFTWARE
\\
Microsoft
\\
"
"Windows Kits
\\
Installed Roots;KitsRoot81"
,
win81Root
,
cmSystemTools
::
KeyWOW64_32
))
{
return
true
;
}
return
false
;
}
std
::
string
cmGlobalVisualStudio15Generator
::
FindMSBuildCommand
()
{
std
::
string
msbuild
;
...
...
This diff is collapsed.
Click to expand it.
Source/cmGlobalVisualStudio15Generator.h
+
4
−
0
View file @
e9e8a5dc
...
...
@@ -28,6 +28,7 @@ public:
virtual
const
char
*
GetToolsVersion
()
{
return
"15.0"
;
}
protected
:
bool
InitializeWindows
(
cmMakefile
*
mf
)
CM_OVERRIDE
;
virtual
bool
SelectWindowsStoreToolset
(
std
::
string
&
toolset
)
const
;
virtual
const
char
*
GetIDEVersion
()
{
return
"15.0"
;
}
...
...
@@ -40,6 +41,9 @@ protected:
// of the toolset is installed
bool
IsWindowsStoreToolsetInstalled
()
const
;
// Check for a Win 8 SDK known to the registry or VS installer tool.
bool
IsWin81SDKInstalled
()
const
;
std
::
string
FindMSBuildCommand
()
CM_OVERRIDE
;
std
::
string
FindDevEnvCommand
()
CM_OVERRIDE
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment