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
84fdc992
Commit
84fdc992
authored
Feb 09, 2014
by
Ben Boeckel
Committed by
Brad King
Mar 08, 2014
Browse files
stringapi: Pass configuration names as strings
parent
f154475b
Changes
74
Hide whitespace changes
Inline
Side-by-side
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
;
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
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