Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
a0836ed9
Commit
a0836ed9
authored
May 03, 2015
by
Stephen Kelly
Browse files
Port to cmMakefile::GetGlobalGenerator.
parent
cbf143bb
Changes
25
Hide whitespace changes
Inline
Side-by-side
Source/cmBuildCommand.cxx
View file @
a0836ed9
...
...
@@ -105,9 +105,8 @@ bool cmBuildCommand
"Ignoring PROJECT_NAME option because it has no effect."
);
}
std
::
string
makecommand
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
GenerateCMakeBuildCommand
(
target
,
configuration
,
""
,
true
);
std
::
string
makecommand
=
this
->
Makefile
->
GetGlobalGenerator
()
->
GenerateCMakeBuildCommand
(
target
,
configuration
,
""
,
true
);
this
->
Makefile
->
AddDefinition
(
variable
,
makecommand
.
c_str
());
...
...
@@ -135,9 +134,8 @@ bool cmBuildCommand
configType
=
cfg
;
}
std
::
string
makecommand
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
GenerateCMakeBuildCommand
(
""
,
configType
,
""
,
true
);
std
::
string
makecommand
=
this
->
Makefile
->
GetGlobalGenerator
()
->
GenerateCMakeBuildCommand
(
""
,
configType
,
""
,
true
);
if
(
cacheValue
)
{
...
...
Source/cmComputeLinkInformation.cxx
View file @
a0836ed9
...
...
@@ -247,7 +247,7 @@ cmComputeLinkInformation
this
->
Target
=
target
;
this
->
Makefile
=
this
->
Target
->
GetMakefile
();
this
->
LocalGenerator
=
this
->
Makefile
->
GetLocalGenerator
();
this
->
GlobalGenerator
=
this
->
LocalGenerator
->
GetGlobalGenerator
();
this
->
GlobalGenerator
=
this
->
Makefile
->
GetGlobalGenerator
();
this
->
CMakeInstance
=
this
->
GlobalGenerator
->
GetCMakeInstance
();
// Check whether to recognize OpenBSD-style library versioned names.
...
...
Source/cmExportBuildFileGenerator.cxx
View file @
a0836ed9
...
...
@@ -274,7 +274,7 @@ cmExportBuildFileGenerator
::
FindNamespaces
(
cmMakefile
*
mf
,
const
std
::
string
&
name
)
{
std
::
vector
<
std
::
string
>
namespaces
;
cmGlobalGenerator
*
gg
=
mf
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
mf
->
GetGlobalGenerator
();
std
::
map
<
std
::
string
,
cmExportBuildFileGenerator
*>&
exportSets
=
gg
->
GetBuildExportSets
();
...
...
Source/cmExportCommand.cxx
View file @
a0836ed9
...
...
@@ -119,8 +119,7 @@ bool cmExportCommand
std
::
vector
<
std
::
string
>
targets
;
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetGlobalGenerator
();
if
(
args
[
0
]
==
"EXPORT"
)
{
...
...
Source/cmExportInstallFileGenerator.cxx
View file @
a0836ed9
...
...
@@ -479,7 +479,7 @@ cmExportInstallFileGenerator
::
FindNamespaces
(
cmMakefile
*
mf
,
const
std
::
string
&
name
)
{
std
::
vector
<
std
::
string
>
namespaces
;
cmGlobalGenerator
*
gg
=
mf
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
mf
->
GetGlobalGenerator
();
const
cmExportSetMap
&
exportSets
=
gg
->
GetExportSets
();
for
(
cmExportSetMap
::
const_iterator
expIt
=
exportSets
.
begin
();
...
...
Source/cmFileCommand.cxx
View file @
a0836ed9
...
...
@@ -3568,8 +3568,7 @@ void cmFileCommand::AddEvaluationFile(const std::string &inputName,
cmsys
::
auto_ptr
<
cmCompiledGeneratorExpression
>
conditionCge
=
conditionGe
.
Parse
(
condition
);
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
AddEvaluationFile
(
inputName
,
this
->
Makefile
->
GetGlobalGenerator
()
->
AddEvaluationFile
(
inputName
,
outputCge
,
this
->
Makefile
,
conditionCge
,
...
...
@@ -3772,8 +3771,8 @@ bool cmFileCommand::HandleLockCommand(
fclose
(
file
);
// Actual lock/unlock
cmFileLockPool
&
lockPool
=
this
->
Makefile
->
Get
Loc
alGenerator
()
->
GetGlobalGenerator
()
->
GetFileLockPool
();
cmFileLockPool
&
lockPool
=
this
->
Makefile
->
Get
Glob
alGenerator
()
->
GetFileLockPool
();
cmFileLockResult
fileLockResult
(
cmFileLockResult
::
MakeOk
());
if
(
release
)
...
...
Source/cmFindLibraryCommand.cxx
View file @
a0836ed9
...
...
@@ -212,7 +212,7 @@ struct cmFindLibraryHelper
cmFindLibraryHelper
::
cmFindLibraryHelper
(
cmMakefile
*
mf
)
:
Makefile
(
mf
)
{
this
->
GG
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
this
->
GG
=
this
->
Makefile
->
GetGlobalGenerator
();
// Collect the list of library name prefixes/suffixes to try.
const
char
*
prefixes_list
=
...
...
Source/cmGeneratorExpressionEvaluationFile.cxx
View file @
a0836ed9
...
...
@@ -103,8 +103,7 @@ void cmGeneratorExpressionEvaluationFile::CreateOutputFile(
std
::
string
const
&
config
)
{
std
::
vector
<
std
::
string
>
enabledLanguages
;
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetGlobalGenerator
();
gg
->
GetEnabledLanguages
(
enabledLanguages
);
for
(
std
::
vector
<
std
::
string
>::
const_iterator
le
=
enabledLanguages
.
begin
();
...
...
@@ -168,8 +167,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
}
std
::
vector
<
std
::
string
>
enabledLanguages
;
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetGlobalGenerator
();
gg
->
GetEnabledLanguages
(
enabledLanguages
);
for
(
std
::
vector
<
std
::
string
>::
const_iterator
le
=
enabledLanguages
.
begin
();
...
...
Source/cmGeneratorExpressionNode.cxx
View file @
a0836ed9
...
...
@@ -768,8 +768,7 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode
}
std
::
vector
<
std
::
string
>
enabledLanguages
;
cmGlobalGenerator
*
gg
=
context
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
context
->
Makefile
->
GetGlobalGenerator
();
gg
->
GetEnabledLanguages
(
enabledLanguages
);
if
(
!
parameters
.
empty
()
&&
std
::
find
(
enabledLanguages
.
begin
(),
enabledLanguages
.
end
(),
...
...
Source/cmGeneratorTarget.cxx
View file @
a0836ed9
...
...
@@ -132,8 +132,7 @@ struct TagVisitor
TagVisitor
(
cmTarget
*
target
,
DataType
&
data
)
:
Data
(
data
),
Target
(
target
),
GlobalGenerator
(
target
->
GetMakefile
()
->
GetLocalGenerator
()
->
GetGlobalGenerator
()),
GlobalGenerator
(
target
->
GetMakefile
()
->
GetGlobalGenerator
()),
Header
(
CM_HEADER_REGEX
),
IsObjLib
(
target
->
GetType
()
==
cmTarget
::
OBJECT_LIBRARY
)
{
...
...
@@ -226,7 +225,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t),
{
this
->
Makefile
=
this
->
Target
->
GetMakefile
();
this
->
LocalGenerator
=
this
->
Makefile
->
GetLocalGenerator
();
this
->
GlobalGenerator
=
this
->
LocalGenerator
->
GetGlobalGenerator
();
this
->
GlobalGenerator
=
this
->
Makefile
->
GetGlobalGenerator
();
}
//----------------------------------------------------------------------------
...
...
@@ -648,8 +647,7 @@ cmTargetTraceDependencies
{
// Convenience.
this
->
Makefile
=
this
->
Target
->
GetMakefile
();
this
->
GlobalGenerator
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
this
->
GlobalGenerator
=
this
->
Makefile
->
GetGlobalGenerator
();
this
->
CurrentEntry
=
0
;
// Queue all the source files already specified for the target.
...
...
@@ -1025,8 +1023,7 @@ void cmGeneratorTarget::GenerateTargetManifest(
return
;
}
cmMakefile
*
mf
=
this
->
Target
->
GetMakefile
();
cmLocalGenerator
*
lg
=
mf
->
GetLocalGenerator
();
cmGlobalGenerator
*
gg
=
lg
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
mf
->
GetGlobalGenerator
();
// Get the names.
std
::
string
name
;
...
...
Source/cmGetCMakePropertyCommand.cxx
View file @
a0836ed9
...
...
@@ -47,8 +47,7 @@ bool cmGetCMakePropertyCommand
else
if
(
args
[
1
]
==
"COMPONENTS"
)
{
const
std
::
set
<
std
::
string
>*
components
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
GetInstallComponents
();
=
this
->
Makefile
->
GetGlobalGenerator
()
->
GetInstallComponents
();
output
=
cmJoin
(
*
components
,
";"
);
}
else
...
...
Source/cmGetDirectoryPropertyCommand.cxx
View file @
a0836ed9
...
...
@@ -53,7 +53,7 @@ bool cmGetDirectoryPropertyCommand
// lookup the makefile from the directory name
cmLocalGenerator
*
lg
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
this
->
Makefile
->
GetGlobalGenerator
()
->
FindLocalGenerator
(
sd
);
if
(
!
lg
)
{
...
...
Source/cmGetPropertyCommand.cxx
View file @
a0836ed9
...
...
@@ -265,8 +265,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
// Lookup the generator.
if
(
cmLocalGenerator
*
lg
=
(
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
FindLocalGenerator
(
dir
)))
(
this
->
Makefile
->
GetGlobalGenerator
()
->
FindLocalGenerator
(
dir
)))
{
// Use the makefile for the directory found.
mf
=
lg
->
GetMakefile
();
...
...
Source/cmIncludeCommand.cxx
View file @
a0836ed9
...
...
@@ -93,8 +93,7 @@ bool cmIncludeCommand
cmSystemTools
::
CollapseFullPath
(
fname
,
this
->
Makefile
->
GetCurrentSourceDirectory
());
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
this
->
Makefile
->
GetGlobalGenerator
();
if
(
gg
->
IsExportedTargetsFile
(
fname_abs
))
{
const
char
*
modal
=
0
;
...
...
Source/cmInstallCommand.cxx
View file @
a0836ed9
...
...
@@ -62,8 +62,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
}
// Enable the install target.
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
this
->
Makefile
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
this
->
DefaultComponentName
=
this
->
Makefile
->
GetSafeDefinition
(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"
);
...
...
@@ -198,7 +197,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
}
//Tell the global generator about any installation component names specified.
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
component
.
c_str
());
return
true
;
...
...
@@ -774,7 +773,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
te
->
HeaderGenerator
=
publicHeaderGenerator
;
te
->
LibraryGenerator
=
libraryGenerator
;
te
->
RuntimeGenerator
=
runtimeGenerator
;
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
GetExportSets
()[
exports
.
GetString
()]
->
AddTargetExport
(
te
);
te
->
InterfaceIncludeDirectories
=
...
...
@@ -786,43 +785,42 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
// specified
if
(
installsArchive
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
archiveArgs
.
GetComponent
().
c_str
());
}
if
(
installsLibrary
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
libraryArgs
.
GetComponent
().
c_str
());
}
if
(
installsRuntime
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
runtimeArgs
.
GetComponent
().
c_str
());
}
if
(
installsFramework
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
frameworkArgs
.
GetComponent
().
c_str
());
}
if
(
installsBundle
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
bundleArgs
.
GetComponent
().
c_str
());
}
if
(
installsPrivateHeader
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
privateHeaderArgs
.
GetComponent
().
c_str
());
}
if
(
installsPublicHeader
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
publicHeaderArgs
.
GetComponent
().
c_str
());
}
if
(
installsResource
)
{
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
resourceArgs
.
GetComponent
().
c_str
());
}
...
...
@@ -890,7 +888,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
CreateInstallFilesGenerator
(
this
->
Makefile
,
absFiles
,
ica
,
programs
));
//Tell the global generator about any installation component names specified.
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
ica
.
GetComponent
().
c_str
());
return
true
;
...
...
@@ -1235,7 +1233,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
// Tell the global generator about any installation component names
// specified.
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
component
.
c_str
());
return
true
;
...
...
@@ -1322,8 +1320,8 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
}
}
cmExportSet
*
exportSet
=
this
->
Makefile
->
Get
Loc
alGenerator
()
->
GetGlobalGenerator
()
->
GetExportSets
()[
exp
.
GetString
()];
cmExportSet
*
exportSet
=
this
->
Makefile
->
Get
Glob
alGenerator
()
->
GetExportSets
()[
exp
.
GetString
()];
if
(
exportOld
.
IsEnabled
())
{
for
(
std
::
vector
<
cmTargetExport
*>::
const_iterator
...
...
Source/cmInstallFilesCommand.cxx
View file @
a0836ed9
...
...
@@ -24,8 +24,7 @@ bool cmInstallFilesCommand
}
// Enable the install target.
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
this
->
Makefile
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
this
->
Destination
=
args
[
0
];
...
...
@@ -48,7 +47,7 @@ bool cmInstallFilesCommand
args
.
begin
()
+
1
,
args
.
end
());
}
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
this
->
Makefile
->
GetSafeDefinition
(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"
));
...
...
Source/cmInstallProgramsCommand.cxx
View file @
a0836ed9
...
...
@@ -22,14 +22,13 @@ bool cmInstallProgramsCommand
}
// Enable the install target.
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
this
->
Makefile
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
this
->
Destination
=
args
[
0
];
this
->
FinalArgs
.
insert
(
this
->
FinalArgs
.
end
(),
args
.
begin
()
+
1
,
args
.
end
());
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
this
->
Makefile
->
GetSafeDefinition
(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"
));
...
...
Source/cmInstallTargetGenerator.cxx
View file @
a0836ed9
...
...
@@ -728,8 +728,7 @@ cmInstallTargetGenerator
i
!=
oldRuntimeDirs
.
end
();
++
i
)
{
std
::
string
runpath
=
mf
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
ExpandCFGIntDir
(
*
i
,
config
);
mf
->
GetGlobalGenerator
()
->
ExpandCFGIntDir
(
*
i
,
config
);
if
(
runpaths
.
find
(
runpath
)
==
runpaths
.
end
())
{
...
...
@@ -745,8 +744,7 @@ cmInstallTargetGenerator
i
!=
newRuntimeDirs
.
end
();
++
i
)
{
std
::
string
runpath
=
mf
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
ExpandCFGIntDir
(
*
i
,
config
);
mf
->
GetGlobalGenerator
()
->
ExpandCFGIntDir
(
*
i
,
config
);
if
(
runpaths
.
find
(
runpath
)
==
runpaths
.
end
())
{
...
...
Source/cmInstallTargetsCommand.cxx
View file @
a0836ed9
...
...
@@ -22,8 +22,7 @@ bool cmInstallTargetsCommand
}
// Enable the install target.
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
this
->
Makefile
->
GetGlobalGenerator
()
->
EnableInstallTarget
();
cmTargets
&
tgts
=
this
->
Makefile
->
GetTargets
();
std
::
vector
<
std
::
string
>::
const_iterator
s
=
args
.
begin
();
...
...
@@ -57,7 +56,7 @@ bool cmInstallTargetsCommand
}
}
this
->
Makefile
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
this
->
Makefile
->
GetGlobalGenerator
()
->
AddInstallComponent
(
this
->
Makefile
->
GetSafeDefinition
(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"
));
...
...
Source/cmMakefile.cxx
View file @
a0836ed9
...
...
@@ -1014,7 +1014,7 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
// Generate a rule file if the main dependency is not available.
if
(
!
file
)
{
cmGlobalGenerator
*
gg
=
this
->
LocalGenerator
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
this
->
GetGlobalGenerator
();
// Construct a rule file associated with the first output produced.
std
::
string
outName
=
gg
->
GenerateRuleFile
(
outputs
[
0
]);
...
...
@@ -1420,8 +1420,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove)
// VS6 IDE does not support definition values with spaces in
// combination with '"', '$', or ';'.
if
((
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
GetName
()
==
"Visual Studio 6"
)
&&
if
((
this
->
GetGlobalGenerator
()
->
GetName
()
==
"Visual Studio 6"
)
&&
(
def
.
find
(
" "
)
!=
def
.
npos
&&
def
.
find_first_of
(
"
\"
$;"
)
!=
def
.
npos
))
{
return
false
;
...
...
@@ -1505,8 +1504,7 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
cmTargets
::
iterator
i
=
this
->
Targets
.
find
(
target
);
if
(
i
!=
this
->
Targets
.
end
())
{
cmTarget
*
tgt
=
this
->
GetCMakeInstance
()
->
GetGlobalGenerator
()
->
FindTarget
(
lib
);
cmTarget
*
tgt
=
this
->
GetGlobalGenerator
()
->
FindTarget
(
lib
);
if
(
tgt
)
{
// if it is not a static or shared library then you can not link to it
...
...
@@ -1698,10 +1696,9 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
}
// create a new local generator and set its parent
cmLocalGenerator
*
lg2
=
this
->
LocalGenerator
->
GetGlobalGenerator
()
cmLocalGenerator
*
lg2
=
this
->
GetGlobalGenerator
()
->
CreateLocalGenerator
(
this
->
LocalGenerator
);
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
AddLocalGenerator
(
lg2
);
this
->
GetGlobalGenerator
()
->
AddLocalGenerator
(
lg2
);
// set the subdirs start dirs
lg2
->
GetMakefile
()
->
SetCurrentSourceDirectory
(
srcPath
);
...
...
@@ -2017,7 +2014,7 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name,
void
cmMakefile
::
AddAlias
(
const
std
::
string
&
lname
,
cmTarget
*
tgt
)
{
this
->
AliasTargets
[
lname
]
=
tgt
;
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
AddAlias
(
lname
,
tgt
);
this
->
GetGlobalGenerator
()
->
AddAlias
(
lname
,
tgt
);
}
cmTarget
*
cmMakefile
::
AddLibrary
(
const
std
::
string
&
lname
,
...
...
@@ -2074,7 +2071,7 @@ cmMakefile::AddNewTarget(cmTarget::TargetType type, const std::string& name)
cmTarget
&
target
=
it
->
second
;
target
.
SetType
(
type
,
name
);
target
.
SetMakefile
(
this
);
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
AddTarget
(
&
it
->
second
);
this
->
GetGlobalGenerator
()
->
AddTarget
(
&
it
->
second
);
return
&
it
->
second
;
}
...
...
@@ -2218,7 +2215,7 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
}
// build the whole source group path
const
char
*
fullname
=
sg
->
GetFullName
();
cmGlobalGenerator
*
gg
=
this
->
LocalGenerator
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
this
->
GetGlobalGenerator
();
if
(
strlen
(
fullname
))
{
std
::
string
guidName
=
"SG_Filter_"
;
...
...
@@ -3175,7 +3172,7 @@ std::string
cmMakefile
::
GetConfigurations
(
std
::
vector
<
std
::
string
>&
configs
,
bool
single
)
const
{
if
(
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
IsMultiConfig
())
if
(
this
->
GetGlobalGenerator
()
->
IsMultiConfig
())
{
if
(
const
char
*
configTypes
=
this
->
GetDefinition
(
"CMAKE_CONFIGURATION_TYPES"
))
...
...
@@ -3546,10 +3543,8 @@ void cmMakefile::EnableLanguage(std::vector<std::string> const & lang,
bool
optional
)
{
this
->
AddDefinition
(
"CMAKE_CFG_INTDIR"
,
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
GetCMakeCFGIntDir
());
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
EnableLanguage
(
lang
,
this
,
optional
);
this
->
GetGlobalGenerator
()
->
GetCMakeCFGIntDir
());
this
->
GetGlobalGenerator
()
->
EnableLanguage
(
lang
,
this
,
optional
);
}
int
cmMakefile
::
TryCompile
(
const
std
::
string
&
srcdir
,
...
...
@@ -3579,7 +3574,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cmake
cm
;
cm
.
SetIsInTryCompile
(
true
);
cmGlobalGenerator
*
gg
=
cm
.
CreateGlobalGenerator
(
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
GetName
());
(
this
->
GetGlobalGenerator
()
->
GetName
());
if
(
!
gg
)
{
cmSystemTools
::
Error
(
...
...
@@ -3640,8 +3635,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cm
.
SetCacheArgs
(
*
cmakeArgs
);
}
// to save time we pass the EnableLanguage info directly
gg
->
EnableLanguagesFromGenerator
(
this
->
LocalGenerator
->
GetGlobalGenerator
(),
this
);
gg
->
EnableLanguagesFromGenerator
(
this
->
GetGlobalGenerator
(),
this
);
if
(
this
->
IsOn
(
"CMAKE_SUPPRESS_DEVELOPER_WARNINGS"
))
{
cm
.
AddCacheEntry
(
"CMAKE_SUPPRESS_DEVELOPER_WARNINGS"
,
...
...
@@ -3673,13 +3667,12 @@ int cmMakefile::TryCompile(const std::string& srcdir,
}
// finally call the generator to actually build the resulting project
int
ret
=
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
TryCompile
(
srcdir
,
bindir
,
projectName
,
targetName
,
fast
,
output
,
this
);
int
ret
=
this
->
GetGlobalGenerator
()
->
TryCompile
(
srcdir
,
bindir
,
projectName
,
targetName
,
fast
,
output
,
this
);
cmSystemTools
::
ChangeDirectory
(
cwd
);
this
->
Internal
->
IsSourceFileTryCompile
=
false
;
...
...
@@ -4402,16 +4395,14 @@ void cmMakefile::PushScope()
this
->
PushLoopBlockBarrier
();
#if defined(CMAKE_BUILD_WITH_CMAKE)
this
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
GetFileLockPool
().
PushFunctionScope
();
this
->
GetGlobalGenerator
()
->
GetFileLockPool
().
PushFunctionScope
();
#endif
}
void
cmMakefile
::
PopScope
()
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
this
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
GetFileLockPool
().
PopFunctionScope
();
this
->
GetGlobalGenerator
()
->
GetFileLockPool
().
PopFunctionScope
();
#endif
this
->
PopLoopBlockBarrier
();
...
...
@@ -4474,7 +4465,7 @@ cmMakefile::AddImportedTarget(const std::string& name,
this
->
ImportedTargets
[
name
]
=
target
.
get
();
if
(
global
)
{
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
AddTarget
(
target
.
get
());
this
->
GetGlobalGenerator
()
->
AddTarget
(
target
.
get
());
}
// Transfer ownership to this cmMakefile object.
...
...
@@ -4502,8 +4493,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name,
}
// Look for a target built in this project.
return
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
FindTarget
(
name
,
excludeAliases
);
return
this
->
GetGlobalGenerator
()
->
FindTarget
(
name
,
excludeAliases
);
}
//----------------------------------------------------------------------------
...
...
@@ -4511,8 +4501,7 @@ bool cmMakefile::IsAlias(const std::string& name) const
{
if
(
this
->
AliasTargets
.
find
(
name
)
!=
this
->
AliasTargets
.
end
())
return
true
;
return
this
->
GetLocalGenerator
()
->
GetGlobalGenerator
()
->
IsAlias
(
name
);
return
this
->
GetGlobalGenerator
()
->
IsAlias
(
name
);
}
//----------------------------------------------------------------------------
...
...
@@ -4521,7 +4510,7 @@ cmMakefile::FindGeneratorTargetToUse(const std::string& name) const
{
if
(
cmTarget
*
t
=
this
->
FindTargetToUse
(
name
))
{
return
this
->
LocalGenerator
->
GetGlobalGenerator
()
->
GetGeneratorTarget
(
t
);
return
this
->
GetGlobalGenerator
()
->
GetGeneratorTarget
(
t
);
}
return
0
;
}
...
...
@@ -4626,7 +4615,7 @@ bool cmMakefile::EnforceUniqueDir(const std::string& srcPath,
const
std
::
string
&
binPath
)
const
{
// Make sure the binary directory is unique.
cmGlobalGenerator
*
gg
=
this
->
LocalGenerator
->
GetGlobalGenerator
();
cmGlobalGenerator
*
gg
=
this
->
GetGlobalGenerator
();
if
(
gg
->
BinaryDirectoryIsNew
(
binPath
))
{
return
true
;
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment