Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
84fdc992
Commit
84fdc992
authored
Feb 09, 2014
by
Ben Boeckel
Committed by
Brad King
Mar 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stringapi: Pass configuration names as strings
parent
f154475b
Changes
74
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
74 changed files
with
539 additions
and
485 deletions
+539
-485
Source/CPack/cmCPackGenerator.cxx
Source/CPack/cmCPackGenerator.cxx
+4
-3
Source/cmComputeLinkDepends.cxx
Source/cmComputeLinkDepends.cxx
+4
-3
Source/cmComputeLinkDepends.h
Source/cmComputeLinkDepends.h
+3
-2
Source/cmComputeLinkInformation.cxx
Source/cmComputeLinkInformation.cxx
+4
-3
Source/cmComputeLinkInformation.h
Source/cmComputeLinkInformation.h
+2
-2
Source/cmComputeTargetDepends.cxx
Source/cmComputeTargetDepends.cxx
+3
-3
Source/cmComputeTargetDepends.h
Source/cmComputeTargetDepends.h
+1
-1
Source/cmCoreTryCompile.cxx
Source/cmCoreTryCompile.cxx
+1
-1
Source/cmCustomCommandGenerator.cxx
Source/cmCustomCommandGenerator.cxx
+1
-1
Source/cmCustomCommandGenerator.h
Source/cmCustomCommandGenerator.h
+3
-2
Source/cmExportBuildFileGenerator.cxx
Source/cmExportBuildFileGenerator.cxx
+5
-3
Source/cmExportBuildFileGenerator.h
Source/cmExportBuildFileGenerator.h
+2
-2
Source/cmExportFileGenerator.cxx
Source/cmExportFileGenerator.cxx
+13
-12
Source/cmExportFileGenerator.h
Source/cmExportFileGenerator.h
+9
-7
Source/cmExportInstallFileGenerator.cxx
Source/cmExportInstallFileGenerator.cxx
+7
-4
Source/cmExportInstallFileGenerator.h
Source/cmExportInstallFileGenerator.h
+3
-3
Source/cmExportTryCompileFileGenerator.h
Source/cmExportTryCompileFileGenerator.h
+3
-3
Source/cmExtraSublimeTextGenerator.cxx
Source/cmExtraSublimeTextGenerator.cxx
+2
-2
Source/cmGeneratorExpression.cxx
Source/cmGeneratorExpression.cxx
+2
-2
Source/cmGeneratorExpression.h
Source/cmGeneratorExpression.h
+2
-2
Source/cmGeneratorExpressionEvaluationFile.cxx
Source/cmGeneratorExpressionEvaluationFile.cxx
+2
-2
Source/cmGeneratorExpressionEvaluationFile.h
Source/cmGeneratorExpressionEvaluationFile.h
+1
-1
Source/cmGeneratorExpressionEvaluator.cxx
Source/cmGeneratorExpressionEvaluator.cxx
+3
-3
Source/cmGeneratorExpressionEvaluator.h
Source/cmGeneratorExpressionEvaluator.h
+1
-1
Source/cmGeneratorTarget.cxx
Source/cmGeneratorTarget.cxx
+16
-14
Source/cmGeneratorTarget.h
Source/cmGeneratorTarget.h
+6
-4
Source/cmGlobalGenerator.cxx
Source/cmGlobalGenerator.cxx
+10
-7
Source/cmGlobalGenerator.h
Source/cmGlobalGenerator.h
+5
-5
Source/cmGlobalNinjaGenerator.cxx
Source/cmGlobalNinjaGenerator.cxx
+3
-3
Source/cmGlobalNinjaGenerator.h
Source/cmGlobalNinjaGenerator.h
+1
-1
Source/cmGlobalUnixMakefileGenerator3.cxx
Source/cmGlobalUnixMakefileGenerator3.cxx
+1
-1
Source/cmGlobalUnixMakefileGenerator3.h
Source/cmGlobalUnixMakefileGenerator3.h
+1
-1
Source/cmGlobalVisualStudio10Generator.cxx
Source/cmGlobalVisualStudio10Generator.cxx
+2
-2
Source/cmGlobalVisualStudio10Generator.h
Source/cmGlobalVisualStudio10Generator.h
+1
-1
Source/cmGlobalVisualStudio6Generator.cxx
Source/cmGlobalVisualStudio6Generator.cxx
+4
-4
Source/cmGlobalVisualStudio6Generator.h
Source/cmGlobalVisualStudio6Generator.h
+2
-2
Source/cmGlobalVisualStudio7Generator.cxx
Source/cmGlobalVisualStudio7Generator.cxx
+4
-4
Source/cmGlobalVisualStudio7Generator.h
Source/cmGlobalVisualStudio7Generator.h
+2
-2
Source/cmGlobalXCodeGenerator.cxx
Source/cmGlobalXCodeGenerator.cxx
+11
-16
Source/cmGlobalXCodeGenerator.h
Source/cmGlobalXCodeGenerator.h
+6
-5
Source/cmInstallExportGenerator.cxx
Source/cmInstallExportGenerator.cxx
+1
-1
Source/cmInstallFilesGenerator.cxx
Source/cmInstallFilesGenerator.cxx
+2
-2
Source/cmInstallFilesGenerator.h
Source/cmInstallFilesGenerator.h
+1
-1
Source/cmInstallGenerator.cxx
Source/cmInstallGenerator.cxx
+1
-1
Source/cmInstallGenerator.h
Source/cmInstallGenerator.h
+1
-1
Source/cmInstallTargetGenerator.cxx
Source/cmInstallTargetGenerator.cxx
+16
-13
Source/cmInstallTargetGenerator.h
Source/cmInstallTargetGenerator.h
+14
-11
Source/cmLocalGenerator.cxx
Source/cmLocalGenerator.cxx
+19
-19
Source/cmLocalGenerator.h
Source/cmLocalGenerator.h
+10
-10
Source/cmLocalVisualStudio6Generator.cxx
Source/cmLocalVisualStudio6Generator.cxx
+8
-8
Source/cmLocalVisualStudio6Generator.h
Source/cmLocalVisualStudio6Generator.h
+5
-4
Source/cmLocalVisualStudio7Generator.cxx
Source/cmLocalVisualStudio7Generator.cxx
+9
-7
Source/cmLocalVisualStudio7Generator.h
Source/cmLocalVisualStudio7Generator.h
+4
-4
Source/cmLocalVisualStudioGenerator.cxx
Source/cmLocalVisualStudioGenerator.cxx
+2
-2
Source/cmLocalVisualStudioGenerator.h
Source/cmLocalVisualStudioGenerator.h
+3
-2
Source/cmLocalXCodeGenerator.cxx
Source/cmLocalXCodeGenerator.cxx
+2
-2
Source/cmMakefile.cxx
Source/cmMakefile.cxx
+7
-6
Source/cmMakefile.h
Source/cmMakefile.h
+2
-2
Source/cmMakefileTargetGenerator.cxx
Source/cmMakefileTargetGenerator.cxx
+10
-5
Source/cmMakefileTargetGenerator.h
Source/cmMakefileTargetGenerator.h
+1
-1
Source/cmOSXBundleGenerator.cxx
Source/cmOSXBundleGenerator.cxx
+1
-1
Source/cmOSXBundleGenerator.h
Source/cmOSXBundleGenerator.h
+2
-2
Source/cmQtAutoGenerators.cxx
Source/cmQtAutoGenerators.cxx
+11
-10
Source/cmQtAutoGenerators.h
Source/cmQtAutoGenerators.h
+2
-2
Source/cmScriptGenerator.cxx
Source/cmScriptGenerator.cxx
+11
-10
Source/cmScriptGenerator.h
Source/cmScriptGenerator.h
+5
-5
Source/cmTarget.cxx
Source/cmTarget.cxx
+146
-131
Source/cmTarget.h
Source/cmTarget.h
+80
-67
Source/cmTestGenerator.cxx
Source/cmTestGenerator.cxx
+1
-1
Source/cmTestGenerator.h
Source/cmTestGenerator.h
+1
-1
Source/cmVisualStudio10TargetGenerator.cxx
Source/cmVisualStudio10TargetGenerator.cxx
+1
-1
Source/cmVisualStudio10TargetGenerator.h
Source/cmVisualStudio10TargetGenerator.h
+1
-1
Source/cmXCodeObject.h
Source/cmXCodeObject.h
+2
-10
Source/cmcmd.cxx
Source/cmcmd.cxx
+1
-1
No files found.
Source/CPack/cmCPackGenerator.cxx
View file @
84fdc992
...
...
@@ -623,7 +623,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
componentsVector
.
push_back
(
installComponent
);
}
const
char
*
buildConfig
=
this
->
GetOption
(
"CPACK_BUILD_CONFIG"
);
const
char
*
buildConfigCstr
=
this
->
GetOption
(
"CPACK_BUILD_CONFIG"
);
std
::
string
buildConfig
=
buildConfigCstr
?
buildConfigCstr
:
""
;
cmGlobalGenerator
*
globalGenerator
=
this
->
MakefileMap
->
GetCMakeInstance
()
->
CreateGlobalGenerator
(
cmakeGenerator
);
...
...
@@ -822,9 +823,9 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
<<
"'"
<<
std
::
endl
);
}
if
(
buildConfig
&&
*
buildConfig
)
if
(
!
buildConfig
.
empty
()
)
{
mf
->
AddDefinition
(
"BUILD_TYPE"
,
buildConfig
);
mf
->
AddDefinition
(
"BUILD_TYPE"
,
buildConfig
.
c_str
()
);
}
std
::
string
installComponentLowerCase
=
cmSystemTools
::
LowerCase
(
installComponent
);
...
...
Source/cmComputeLinkDepends.cxx
View file @
84fdc992
...
...
@@ -172,7 +172,7 @@ satisfy dependencies.
//----------------------------------------------------------------------------
cmComputeLinkDepends
::
cmComputeLinkDepends
(
cmTarget
const
*
target
,
const
char
*
config
,
::
cmComputeLinkDepends
(
cmTarget
const
*
target
,
const
std
::
string
&
config
,
cmTarget
const
*
head
)
{
// Store context information.
...
...
@@ -184,7 +184,8 @@ cmComputeLinkDepends
this
->
CMakeInstance
=
this
->
GlobalGenerator
->
GetCMakeInstance
();
// The configuration being linked.
this
->
Config
=
(
config
&&
*
config
)
?
config
:
0
;
this
->
HasConfig
=
!
config
.
empty
();
this
->
Config
=
(
this
->
HasConfig
)
?
config
:
std
::
string
();
this
->
LinkType
=
this
->
Target
->
ComputeLinkType
(
this
->
Config
);
// Enable debug mode if requested.
...
...
@@ -255,7 +256,7 @@ cmComputeLinkDepends::Compute()
"---------------------------------------
\n
"
);
fprintf
(
stderr
,
"Link dependency analysis for target %s, config %s
\n
"
,
this
->
Target
->
GetName
().
c_str
(),
this
->
Config
?
this
->
Config
:
"noconfig"
);
this
->
Has
Config
?
this
->
Config
.
c_str
()
:
"noconfig"
);
this
->
DisplayConstraintGraph
();
}
...
...
Source/cmComputeLinkDepends.h
View file @
84fdc992
...
...
@@ -32,7 +32,7 @@ class cmake;
class
cmComputeLinkDepends
{
public:
cmComputeLinkDepends
(
cmTarget
const
*
target
,
const
char
*
config
,
cmComputeLinkDepends
(
cmTarget
const
*
target
,
const
std
::
string
&
config
,
cmTarget
const
*
head
);
~
cmComputeLinkDepends
();
...
...
@@ -68,7 +68,8 @@ private:
bool
DebugMode
;
// Configuration information.
const
char
*
Config
;
bool
HasConfig
;
std
::
string
Config
;
cmTarget
::
LinkLibraryType
LinkType
;
// Output information.
...
...
Source/cmComputeLinkInformation.cxx
View file @
84fdc992
...
...
@@ -239,7 +239,7 @@ because this need be done only for shared libraries without soname-s.
//----------------------------------------------------------------------------
cmComputeLinkInformation
::
cmComputeLinkInformation
(
cmTarget
const
*
target
,
const
char
*
config
,
::
cmComputeLinkInformation
(
cmTarget
const
*
target
,
const
std
::
string
&
config
,
cmTarget
const
*
headTarget
)
{
// Store context information.
...
...
@@ -505,7 +505,8 @@ bool cmComputeLinkInformation::Compute()
}
// Compute the ordered link line items.
cmComputeLinkDepends
cld
(
this
->
Target
,
this
->
Config
,
this
->
HeadTarget
);
cmComputeLinkDepends
cld
(
this
->
Target
,
this
->
Config
.
c_str
(),
this
->
HeadTarget
);
cld
.
SetOldLinkDirMode
(
this
->
OldLinkDirMode
);
cmComputeLinkDepends
::
EntryVector
const
&
linkEntries
=
cld
.
Compute
();
...
...
@@ -624,7 +625,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
cmTarget
const
*
tgt
)
{
// Compute the proper name to use to link this library.
const
char
*
config
=
this
->
Config
;
const
std
::
string
&
config
=
this
->
Config
;
bool
impexe
=
(
tgt
&&
tgt
->
IsExecutableWithExports
());
if
(
impexe
&&
!
this
->
UseImportLibrary
&&
!
this
->
LoaderFlag
)
{
...
...
Source/cmComputeLinkInformation.h
View file @
84fdc992
...
...
@@ -29,7 +29,7 @@ class cmOrderDirectories;
class
cmComputeLinkInformation
{
public:
cmComputeLinkInformation
(
cmTarget
const
*
target
,
const
char
*
config
,
cmComputeLinkInformation
(
cmTarget
const
*
target
,
const
std
::
string
&
config
,
cmTarget
const
*
headTarget
);
~
cmComputeLinkInformation
();
bool
Compute
();
...
...
@@ -82,7 +82,7 @@ private:
cmake
*
CMakeInstance
;
// Configuration information.
const
char
*
Config
;
std
::
string
Config
;
std
::
string
LinkLanguage
;
bool
LinkDependsNoShared
;
...
...
Source/cmComputeTargetDepends.cxx
View file @
84fdc992
...
...
@@ -214,7 +214,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
std
::
set
<
std
::
string
>
emitted
;
{
std
::
vector
<
std
::
string
>
tlibs
;
depender
->
GetDirectLinkLibraries
(
0
,
tlibs
,
depender
);
depender
->
GetDirectLinkLibraries
(
""
,
tlibs
,
depender
);
// A target should not depend on itself.
emitted
.
insert
(
depender
->
GetName
());
for
(
std
::
vector
<
std
::
string
>::
const_iterator
lib
=
tlibs
.
begin
();
...
...
@@ -274,7 +274,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
//----------------------------------------------------------------------------
void
cmComputeTargetDepends
::
AddInterfaceDepends
(
int
depender_index
,
cmTarget
const
*
dependee
,
const
char
*
config
,
const
std
::
string
&
config
,
std
::
set
<
std
::
string
>
&
emitted
)
{
cmTarget
const
*
depender
=
this
->
Targets
[
depender_index
];
...
...
@@ -317,7 +317,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
if
(
dependee
)
{
this
->
AddInterfaceDepends
(
depender_index
,
dependee
,
0
,
emitted
);
this
->
AddInterfaceDepends
(
depender_index
,
dependee
,
""
,
emitted
);
std
::
vector
<
std
::
string
>
configs
;
depender
->
GetMakefile
()
->
GetConfigurations
(
configs
);
for
(
std
::
vector
<
std
::
string
>::
const_iterator
it
=
configs
.
begin
();
...
...
Source/cmComputeTargetDepends.h
View file @
84fdc992
...
...
@@ -55,7 +55,7 @@ private:
const
std
::
string
&
dependee_name
,
bool
linking
,
std
::
set
<
std
::
string
>
&
emitted
);
void
AddInterfaceDepends
(
int
depender_index
,
cmTarget
const
*
dependee
,
const
char
*
config
,
const
std
::
string
&
config
,
std
::
set
<
std
::
string
>
&
emitted
);
cmGlobalGenerator
*
GlobalGenerator
;
bool
DebugMode
;
...
...
Source/cmCoreTryCompile.cxx
View file @
84fdc992
...
...
@@ -357,7 +357,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
cmExportTryCompileFileGenerator
tcfg
;
tcfg
.
SetExportFile
((
this
->
BinaryDirectory
+
fname
).
c_str
());
tcfg
.
SetExports
(
targets
);
tcfg
.
SetConfig
(
this
->
Makefile
->
GetDefinition
(
tcfg
.
SetConfig
(
this
->
Makefile
->
Get
Safe
Definition
(
"CMAKE_TRY_COMPILE_CONFIGURATION"
));
if
(
!
tcfg
.
GenerateImportFile
())
...
...
Source/cmCustomCommandGenerator.cxx
View file @
84fdc992
...
...
@@ -18,7 +18,7 @@
//----------------------------------------------------------------------------
cmCustomCommandGenerator
::
cmCustomCommandGenerator
(
cmCustomCommand
const
&
cc
,
const
char
*
config
,
cmMakefile
*
mf
)
:
cmCustomCommand
const
&
cc
,
const
std
::
string
&
config
,
cmMakefile
*
mf
)
:
CC
(
cc
),
Config
(
config
),
Makefile
(
mf
),
LG
(
mf
->
GetLocalGenerator
()),
OldStyle
(
cc
.
GetEscapeOldStyle
()),
MakeVars
(
cc
.
GetEscapeAllowMakeVars
()),
GE
(
new
cmGeneratorExpression
(
cc
.
GetBacktrace
()))
...
...
Source/cmCustomCommandGenerator.h
View file @
84fdc992
...
...
@@ -22,14 +22,15 @@ class cmGeneratorExpression;
class
cmCustomCommandGenerator
{
cmCustomCommand
const
&
CC
;
const
char
*
Config
;
std
::
string
Config
;
cmMakefile
*
Makefile
;
cmLocalGenerator
*
LG
;
bool
OldStyle
;
bool
MakeVars
;
cmGeneratorExpression
*
GE
;
public:
cmCustomCommandGenerator
(
cmCustomCommand
const
&
cc
,
const
char
*
config
,
cmCustomCommandGenerator
(
cmCustomCommand
const
&
cc
,
const
std
::
string
&
config
,
cmMakefile
*
mf
);
~
cmCustomCommandGenerator
();
unsigned
int
GetNumberOfCommands
()
const
;
...
...
Source/cmExportBuildFileGenerator.cxx
View file @
84fdc992
...
...
@@ -118,8 +118,9 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
void
cmExportBuildFileGenerator
::
GenerateImportTargetsConfig
(
std
::
ostream
&
os
,
const
char
*
config
,
std
::
string
const
&
suffix
,
std
::
vector
<
std
::
string
>
&
missingTargets
)
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
std
::
vector
<
std
::
string
>
&
missingTargets
)
{
for
(
std
::
vector
<
cmTarget
*>::
const_iterator
tei
=
this
->
Exports
.
begin
();
...
...
@@ -166,7 +167,8 @@ void cmExportBuildFileGenerator::SetExportSet(cmExportSet *exportSet)
//----------------------------------------------------------------------------
void
cmExportBuildFileGenerator
::
SetImportLocationProperty
(
const
char
*
config
,
std
::
string
const
&
suffix
,
::
SetImportLocationProperty
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmTarget
*
target
,
ImportPropertyMap
&
properties
)
{
// Get the makefile in which to lookup target information.
...
...
Source/cmExportBuildFileGenerator.h
View file @
84fdc992
...
...
@@ -52,7 +52,7 @@ protected:
// Implement virtual methods from the superclass.
virtual
bool
GenerateMainFile
(
std
::
ostream
&
os
);
virtual
void
GenerateImportTargetsConfig
(
std
::
ostream
&
os
,
const
char
*
config
,
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
std
::
vector
<
std
::
string
>
&
missingTargets
);
virtual
void
HandleMissingTarget
(
std
::
string
&
link_libs
,
...
...
@@ -66,7 +66,7 @@ protected:
int
occurrences
);
/** Fill in properties indicating built file locations. */
void
SetImportLocationProperty
(
const
char
*
config
,
void
SetImportLocationProperty
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmTarget
*
target
,
ImportPropertyMap
&
properties
);
...
...
Source/cmExportFileGenerator.cxx
View file @
84fdc992
...
...
@@ -35,7 +35,7 @@ cmExportFileGenerator::cmExportFileGenerator()
}
//----------------------------------------------------------------------------
void
cmExportFileGenerator
::
AddConfiguration
(
const
char
*
config
)
void
cmExportFileGenerator
::
AddConfiguration
(
const
std
::
string
&
config
)
{
this
->
Configurations
.
push_back
(
config
);
}
...
...
@@ -117,12 +117,12 @@ bool cmExportFileGenerator::GenerateImportFile()
//----------------------------------------------------------------------------
void
cmExportFileGenerator
::
GenerateImportConfig
(
std
::
ostream
&
os
,
const
char
*
config
,
const
std
::
string
&
config
,
std
::
vector
<
std
::
string
>
&
missingTargets
)
{
// Construct the property configuration suffix.
std
::
string
suffix
=
"_"
;
if
(
config
&&
*
config
)
if
(
!
config
.
empty
()
)
{
suffix
+=
cmSystemTools
::
UpperCase
(
config
);
}
...
...
@@ -345,7 +345,7 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
true
);
this
->
ReplaceInstallPrefix
(
dirs
);
cmsys
::
auto_ptr
<
cmCompiledGeneratorExpression
>
cge
=
ge
.
Parse
(
dirs
);
std
::
string
exportDirs
=
cge
->
Evaluate
(
target
->
GetMakefile
(),
0
,
std
::
string
exportDirs
=
cge
->
Evaluate
(
target
->
GetMakefile
(),
""
,
false
,
target
);
if
(
cge
->
GetHadContextSensitiveCondition
())
...
...
@@ -426,7 +426,7 @@ void getPropertyContents(cmTarget const* tgt, const std::string& prop,
//----------------------------------------------------------------------------
void
getCompatibleInterfaceProperties
(
cmTarget
*
target
,
std
::
set
<
std
::
string
>
&
ifaceProperties
,
const
char
*
config
)
const
std
::
string
&
config
)
{
cmComputeLinkInformation
*
info
=
target
->
GetLinkInformation
(
config
);
...
...
@@ -490,7 +490,7 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
if
(
target
->
GetType
()
!=
cmTarget
::
INTERFACE_LIBRARY
)
{
getCompatibleInterfaceProperties
(
target
,
ifaceProperties
,
0
);
getCompatibleInterfaceProperties
(
target
,
ifaceProperties
,
""
);
std
::
vector
<
std
::
string
>
configNames
;
target
->
GetMakefile
()
->
GetConfigurations
(
configNames
);
...
...
@@ -687,7 +687,7 @@ cmExportFileGenerator::ReplaceInstallPrefix(std::string &)
//----------------------------------------------------------------------------
void
cmExportFileGenerator
::
SetImportLinkInterface
(
const
char
*
config
,
std
::
string
const
&
suffix
,
::
SetImportLinkInterface
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmGeneratorExpression
::
PreprocessContext
preprocessRule
,
cmTarget
*
target
,
ImportPropertyMap
&
properties
,
std
::
vector
<
std
::
string
>&
missingTargets
)
...
...
@@ -762,7 +762,8 @@ cmExportFileGenerator
//----------------------------------------------------------------------------
void
cmExportFileGenerator
::
SetImportDetailProperties
(
const
char
*
config
,
std
::
string
const
&
suffix
,
::
SetImportDetailProperties
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmTarget
*
target
,
ImportPropertyMap
&
properties
,
std
::
vector
<
std
::
string
>&
missingTargets
)
...
...
@@ -864,11 +865,11 @@ cmExportFileGenerator
//----------------------------------------------------------------------------
void
cmExportFileGenerator
::
GenerateImportHeaderCode
(
std
::
ostream
&
os
,
const
char
*
config
)
const
std
::
string
&
config
)
{
os
<<
"#----------------------------------------------------------------
\n
"
<<
"# Generated CMake target import file"
;
if
(
config
)
if
(
!
config
.
empty
()
)
{
os
<<
" for configuration
\"
"
<<
config
<<
"
\"
.
\n
"
;
}
...
...
@@ -999,7 +1000,7 @@ cmExportFileGenerator
//----------------------------------------------------------------------------
void
cmExportFileGenerator
::
GenerateImportPropertyCode
(
std
::
ostream
&
os
,
const
char
*
config
,
::
GenerateImportPropertyCode
(
std
::
ostream
&
os
,
const
std
::
string
&
config
,
cmTarget
const
*
target
,
ImportPropertyMap
const
&
properties
)
{
...
...
@@ -1013,7 +1014,7 @@ cmExportFileGenerator
<<
config
<<
"
\"\n
"
;
os
<<
"set_property(TARGET "
<<
targetName
<<
" APPEND PROPERTY IMPORTED_CONFIGURATIONS "
;
if
(
config
&&
*
config
)
if
(
!
config
.
empty
()
)
{
os
<<
cmSystemTools
::
UpperCase
(
config
);
}
...
...
Source/cmExportFileGenerator.h
View file @
84fdc992
...
...
@@ -56,7 +56,7 @@ public:
void
SetExportOld
(
bool
exportOld
)
{
this
->
ExportOld
=
exportOld
;
}
/** Add a configuration to be exported. */
void
AddConfiguration
(
const
char
*
config
);
void
AddConfiguration
(
const
std
::
string
&
config
);
/** Actually generate the export file. Returns whether there was an
error. */
...
...
@@ -67,15 +67,16 @@ protected:
// Generate per-configuration target information to the given output
// stream.
void
GenerateImportConfig
(
std
::
ostream
&
os
,
const
char
*
config
,
void
GenerateImportConfig
(
std
::
ostream
&
os
,
const
std
::
string
&
config
,
std
::
vector
<
std
::
string
>
&
missingTargets
);
// Methods to implement export file code generation.
void
GenerateImportHeaderCode
(
std
::
ostream
&
os
,
const
char
*
config
=
0
);
void
GenerateImportHeaderCode
(
std
::
ostream
&
os
,
const
std
::
string
&
config
=
""
);
void
GenerateImportFooterCode
(
std
::
ostream
&
os
);
void
GenerateImportVersionCode
(
std
::
ostream
&
os
);
void
GenerateImportTargetCode
(
std
::
ostream
&
os
,
cmTarget
const
*
target
);
void
GenerateImportPropertyCode
(
std
::
ostream
&
os
,
const
char
*
config
,
void
GenerateImportPropertyCode
(
std
::
ostream
&
os
,
const
std
::
string
&
config
,
cmTarget
const
*
target
,
ImportPropertyMap
const
&
properties
);
void
GenerateImportedFileChecksCode
(
std
::
ostream
&
os
,
cmTarget
*
target
,
...
...
@@ -90,7 +91,7 @@ protected:
// Collect properties with detailed information about targets beyond
// their location on disk.
void
SetImportDetailProperties
(
const
char
*
config
,
void
SetImportDetailProperties
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmTarget
*
target
,
ImportPropertyMap
&
properties
,
std
::
vector
<
std
::
string
>&
missingTargets
);
...
...
@@ -105,7 +106,7 @@ protected:
/** Each subclass knows where the target files are located. */
virtual
void
GenerateImportTargetsConfig
(
std
::
ostream
&
os
,
const
char
*
config
,
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
std
::
vector
<
std
::
string
>
&
missingTargets
)
=
0
;
...
...
@@ -137,7 +138,8 @@ protected:
ImportPropertyMap
&
properties
,
std
::
vector
<
std
::
string
>
&
missingTargets
);
void
SetImportLinkInterface
(
const
char
*
config
,
std
::
string
const
&
suffix
,
void
SetImportLinkInterface
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmGeneratorExpression
::
PreprocessContext
preprocessRule
,
cmTarget
*
target
,
ImportPropertyMap
&
properties
,
std
::
vector
<
std
::
string
>&
missingTargets
);
...
...
Source/cmExportInstallFileGenerator.cxx
View file @
84fdc992
...
...
@@ -240,7 +240,8 @@ cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string &input)
//----------------------------------------------------------------------------
bool
cmExportInstallFileGenerator
::
GenerateImportFileConfig
(
const
char
*
config
,
cmExportInstallFileGenerator
::
GenerateImportFileConfig
(
const
std
::
string
&
config
,
std
::
vector
<
std
::
string
>
&
missingTargets
)
{
// Skip configurations not enabled for this export.
...
...
@@ -254,7 +255,7 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config,
fileName
+=
"/"
;
fileName
+=
this
->
FileBase
;
fileName
+=
"-"
;
if
(
config
&&
*
config
)
if
(
!
config
.
empty
()
)
{
fileName
+=
cmSystemTools
::
LowerCase
(
config
);
}
...
...
@@ -296,7 +297,8 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config,
void
cmExportInstallFileGenerator
::
GenerateImportTargetsConfig
(
std
::
ostream
&
os
,
const
char
*
config
,
std
::
string
const
&
suffix
,
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
std
::
vector
<
std
::
string
>
&
missingTargets
)
{
// Add each target in the set to the export.
...
...
@@ -355,7 +357,8 @@ cmExportInstallFileGenerator
//----------------------------------------------------------------------------
void
cmExportInstallFileGenerator
::
SetImportLocationProperty
(
const
char
*
config
,
std
::
string
const
&
suffix
,
::
SetImportLocationProperty
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmInstallTargetGenerator
*
itgen
,
ImportPropertyMap
&
properties
,
std
::
set
<
std
::
string
>&
importedLocations
...
...
Source/cmExportInstallFileGenerator.h
View file @
84fdc992
...
...
@@ -52,7 +52,7 @@ protected:
// Implement virtual methods from the superclass.
virtual
bool
GenerateMainFile
(
std
::
ostream
&
os
);
virtual
void
GenerateImportTargetsConfig
(
std
::
ostream
&
os
,
const
char
*
config
,
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
std
::
vector
<
std
::
string
>
&
missingTargets
);
virtual
void
HandleMissingTarget
(
std
::
string
&
link_libs
,
...
...
@@ -72,11 +72,11 @@ protected:
/** Generate a per-configuration file for the targets. */
bool
GenerateImportFileConfig
(
const
char
*
config
,
bool
GenerateImportFileConfig
(
const
std
::
string
&
config
,
std
::
vector
<
std
::
string
>
&
missingTargets
);
/** Fill in properties indicating installed file locations. */
void
SetImportLocationProperty
(
const
char
*
config
,
void
SetImportLocationProperty
(
const
std
::
string
&
config
,
std
::
string
const
&
suffix
,
cmInstallTargetGenerator
*
itgen
,
ImportPropertyMap
&
properties
,
...
...
Source/cmExportTryCompileFileGenerator.h
View file @
84fdc992
...
...
@@ -23,14 +23,14 @@ public:
/** Set the list of targets to export. */
void
SetExports
(
const
std
::
vector
<
cmTarget
const
*>
&
exports
)
{
this
->
Exports
=
exports
;
}
void
SetConfig
(
const
char
*
config
)
{
this
->
Config
=
config
;
}
void
SetConfig
(
const
std
::
string
&
config
)
{
this
->
Config
=
config
;
}
protected:
// Implement virtual methods from the superclass.
virtual
bool
GenerateMainFile
(
std
::
ostream
&
os
);
virtual
void
GenerateImportTargetsConfig
(
std
::
ostream
&
,
const
char
*
,
const
std
::
string
&
,
std
::
string
const
&
,
std
::
vector
<
std
::
string
>&
)
{}
virtual
void
HandleMissingTarget
(
std
::
string
&
,
...
...
@@ -51,7 +51,7 @@ private:
std
::
vector
<
cmTarget
const
*>
Exports
;
const
char
*
Config
;
std
::
string
Config
;
};
#endif
Source/cmExtraSublimeTextGenerator.cxx
View file @
84fdc992
...
...
@@ -375,7 +375,7 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source,
{
language
=
"C"
;
}
const
char
*
config
=
makefile
->
GetSafeDefinition
(
"CMAKE_BUILD_TYPE"
);
const
std
::
string
&
config
=
makefile
->
GetSafeDefinition
(
"CMAKE_BUILD_TYPE"
);
// Add language-specific flags.
lg
->
AddLanguageFlags
(
flags
,
language
,
config
);
...
...
@@ -425,7 +425,7 @@ ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target,
std
::
set
<
std
::
string
>
defines
;
cmMakefile
*
makefile
=
lg
->
GetMakefile
();
const
std
::
string
&
language
=
source
->
GetLanguage
();
const
char
*
config
=
makefile
->
GetSafeDefinition
(
"CMAKE_BUILD_TYPE"
);
const
std
::
string
&
config
=
makefile
->
GetSafeDefinition
(
"CMAKE_BUILD_TYPE"
);
// Add the export symbol definition for shared library objects.
if
(
const
char
*
exportMacro
=
target
->
GetExportMacro
())
...
...
Source/cmGeneratorExpression.cxx
View file @
84fdc992
...
...
@@ -52,7 +52,7 @@ cmGeneratorExpression::~cmGeneratorExpression()
//----------------------------------------------------------------------------
const
char
*
cmCompiledGeneratorExpression
::
Evaluate
(
cmMakefile
*
mf
,
const
char
*
config
,
bool
quiet
,
cmMakefile
*
mf
,
const
std
::
string
&
config
,
bool
quiet
,
cmTarget
const
*
headTarget
,
cmGeneratorExpressionDAGChecker
*
dagChecker
)
const
{
...
...
@@ -66,7 +66,7 @@ const char *cmCompiledGeneratorExpression::Evaluate(
//----------------------------------------------------------------------------
const
char
*
cmCompiledGeneratorExpression
::
Evaluate
(
cmMakefile
*
mf
,
const
char
*
config
,
bool
quiet
,
cmMakefile
*
mf
,
const
std
::
string
&
config
,
bool
quiet
,
cmTarget
const
*
headTarget
,
cmTarget
const
*
currentTarget
,
cmGeneratorExpressionDAGChecker
*
dagChecker
)
const
...
...
Source/cmGeneratorExpression.h
View file @
84fdc992
...
...
@@ -78,12 +78,12 @@ private:
class
cmCompiledGeneratorExpression
{
public:
const
char
*
Evaluate
(
cmMakefile
*
mf
,
const
char
*
config
,
const
char
*
Evaluate
(
cmMakefile
*
mf
,
const
std
::
string
&
config
,
bool
quiet
=
false
,
cmTarget
const
*
headTarget
=
0
,
cmTarget
const
*
currentTarget
=
0
,
cmGeneratorExpressionDAGChecker
*
dagChecker
=
0
)
const
;
const
char
*
Evaluate
(
cmMakefile
*
mf
,
const
char
*
config
,
const
char
*
Evaluate
(
cmMakefile
*
mf
,
const
std
::
string
&
config
,
bool
quiet
,
cmTarget
const
*
headTarget
,
cmGeneratorExpressionDAGChecker
*
dagChecker
)
const
;
...
...
Source/cmGeneratorExpressionEvaluationFile.cxx
View file @
84fdc992
...
...
@@ -33,7 +33,7 @@ cmGeneratorExpressionEvaluationFile::cmGeneratorExpressionEvaluationFile(
}
//----------------------------------------------------------------------------
void
cmGeneratorExpressionEvaluationFile
::
Generate
(
const
char
*
config
,
void
cmGeneratorExpressionEvaluationFile
::
Generate
(
const
std
::
string
&
config
,
cmCompiledGeneratorExpression
*
inputExpression
,
std
::
map
<
std
::
string
,
std
::
string
>
&
outputFiles
)
{
...
...
@@ -135,7 +135,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
if
(
allConfigs
.
empty
())
{
this
->
Generate
(
0
,
inputExpression
.
get
(),
outputFiles
);
this
->
Generate
(
""
,
inputExpression
.
get
(),
outputFiles
);
}
else
{
...
...
Source/cmGeneratorExpressionEvaluationFile.h
View file @
84fdc992
...
...
@@ -32,7 +32,7 @@ public:
std
::
vector
<
std
::
string
>
GetFiles
()
const
{
return
this
->
Files
;
}
private:
void
Generate
(
const
char
*
config
,
void
Generate
(
const
std
::
string
&
config
,
cmCompiledGeneratorExpression
*
inputExpression
,
std
::
map
<
std
::
string
,
std
::
string
>
&
outputFiles
);
...
...
Source/cmGeneratorExpressionEvaluator.cxx
View file @
84fdc992
...
...
@@ -689,7 +689,7 @@ static const struct ConfigurationNode : public cmGeneratorExpressionNode
cmGeneratorExpressionDAGChecker
*
)
const
{
context
->
HadContextSensitiveCondition
=
true
;
return
context
->
Config
?
context
->
Config
:
""
;
return
context
->
Config
;
}
}
configurationNode
;
...
...
@@ -718,13 +718,13 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
return
std
::
string
();
}
context
->
HadContextSensitiveCondition
=
true
;
if
(
!
context
->
Config
)
if
(
context
->
Config
.
empty
()
)
{
return
parameters
.
front
().
empty
()
?
"1"
:
"0"
;