Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
c871446a
Commit
c871446a
authored
Nov 15, 2017
by
Brad King
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmSourceGroup: Return strings from GetName and GetFullName
parent
1fe9e49b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
18 deletions
+19
-18
Source/cmGhsMultiTargetGenerator.cxx
Source/cmGhsMultiTargetGenerator.cxx
+2
-2
Source/cmGlobalXCodeGenerator.cxx
Source/cmGlobalXCodeGenerator.cxx
+2
-2
Source/cmLocalVisualStudio7Generator.cxx
Source/cmLocalVisualStudio7Generator.cxx
+1
-1
Source/cmMakefile.cxx
Source/cmMakefile.cxx
+3
-2
Source/cmSourceGroup.cxx
Source/cmSourceGroup.cxx
+5
-5
Source/cmSourceGroup.h
Source/cmSourceGroup.h
+2
-2
Source/cmVisualStudio10TargetGenerator.cxx
Source/cmVisualStudio10TargetGenerator.cxx
+4
-4
No files found.
Source/cmGhsMultiTargetGenerator.cxx
View file @
c871446a
...
...
@@ -489,7 +489,7 @@ void cmGhsMultiTargetGenerator::WriteSources(
char
const
*
sourceFullPath
=
(
*
si
)
->
GetFullPath
().
c_str
();
cmSourceGroup
*
sourceGroup
=
this
->
Makefile
->
FindSourceGroup
(
sourceFullPath
,
sourceGroups
);
std
::
string
sgPath
(
sourceGroup
->
GetFullName
()
)
;
std
::
string
sgPath
=
sourceGroup
->
GetFullName
();
cmSystemTools
::
ConvertToUnixSlashes
(
sgPath
);
cmGlobalGhsMultiGenerator
::
AddFilesUpToPath
(
this
->
GetFolderBuildStreams
(),
&
this
->
FolderBuildStreams
,
...
...
@@ -608,7 +608,7 @@ std::string cmGhsMultiTargetGenerator::ComputeLongestObjectDirectory(
cmSourceGroup
*
sourceGroup
=
localGhsMultiGenerator
->
GetMakefile
()
->
FindSourceGroup
(
sourceFullPath
,
sourceGroups
);
std
::
string
const
sgPath
(
sourceGroup
->
GetFullName
()
)
;
std
::
string
const
&
sgPath
=
sourceGroup
->
GetFullName
();
dir_max
+=
sgPath
;
dir_max
+=
"/Objs/libs/"
;
dir_max
+=
generatorTarget
->
Target
->
GetName
();
...
...
Source/cmGlobalXCodeGenerator.cxx
View file @
c871446a
...
...
@@ -2797,13 +2797,13 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup(
// If it's the default source group (empty name) then put the source file
// directly in the tgroup...
//
if
(
std
::
string
(
sg
->
GetFullName
()
)
.
empty
())
{
if
(
sg
->
GetFullName
().
empty
())
{
this
->
GroupNameMap
[
s
]
=
tgroup
;
return
tgroup
;
}
// It's a recursive folder structure, let's find the real parent group
if
(
std
::
string
(
sg
->
GetFullName
()
)
!=
std
::
string
(
sg
->
GetName
())
)
{
if
(
sg
->
GetFullName
()
!=
sg
->
GetName
())
{
std
::
string
curr_folder
=
target
;
curr_folder
+=
"/"
;
for
(
auto
const
&
folder
:
...
...
Source/cmLocalVisualStudio7Generator.cxx
View file @
c871446a
...
...
@@ -1600,7 +1600,7 @@ bool cmLocalVisualStudio7Generator::WriteGroup(
}
// If the group has a name, write the header.
std
::
string
name
=
sg
->
GetName
();
std
::
string
const
&
name
=
sg
->
GetName
();
if
(
!
name
.
empty
())
{
this
->
WriteVCProjBeginGroup
(
fout
,
name
.
c_str
(),
""
);
}
...
...
Source/cmMakefile.cxx
View file @
c871446a
...
...
@@ -1950,7 +1950,7 @@ cmSourceGroup* cmMakefile::GetSourceGroup(
// first look for source group starting with the same as the one we want
for
(
cmSourceGroup
const
&
srcGroup
:
this
->
SourceGroups
)
{
std
::
string
sgName
=
srcGroup
.
GetName
();
std
::
string
const
&
sgName
=
srcGroup
.
GetName
();
if
(
sgName
==
name
[
0
])
{
sg
=
const_cast
<
cmSourceGroup
*>
(
&
srcGroup
);
break
;
...
...
@@ -2014,7 +2014,8 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
}
// build the whole source group path
for
(
++
i
;
i
<=
lastElement
;
++
i
)
{
sg
->
AddChild
(
cmSourceGroup
(
name
[
i
].
c_str
(),
nullptr
,
sg
->
GetFullName
()));
sg
->
AddChild
(
cmSourceGroup
(
name
[
i
].
c_str
(),
nullptr
,
sg
->
GetFullName
().
c_str
()));
sg
=
sg
->
LookupChild
(
name
[
i
].
c_str
());
}
...
...
Source/cmSourceGroup.cxx
View file @
c871446a
...
...
@@ -60,14 +60,14 @@ void cmSourceGroup::AddGroupFile(const std::string& name)
this
->
GroupFiles
.
insert
(
name
);
}
const
char
*
cmSourceGroup
::
GetName
()
const
std
::
string
const
&
cmSourceGroup
::
GetName
()
const
{
return
this
->
Name
.
c_str
()
;
return
this
->
Name
;
}
const
char
*
cmSourceGroup
::
GetFullName
()
const
std
::
string
const
&
cmSourceGroup
::
GetFullName
()
const
{
return
this
->
FullName
.
c_str
()
;
return
this
->
FullName
;
}
bool
cmSourceGroup
::
MatchesRegex
(
const
char
*
name
)
...
...
@@ -105,7 +105,7 @@ cmSourceGroup* cmSourceGroup::LookupChild(const char* name) const
// st
for
(;
iter
!=
end
;
++
iter
)
{
std
::
string
sgName
=
iter
->
GetName
();
std
::
string
const
&
sgName
=
iter
->
GetName
();
// look if descenened is the one were looking for
if
(
sgName
==
name
)
{
...
...
Source/cmSourceGroup.h
View file @
c871446a
...
...
@@ -55,12 +55,12 @@ public:
/**
* Get the name of this group.
*/
const
char
*
GetName
()
const
;
std
::
string
const
&
GetName
()
const
;
/**
* Get the full path name for group.
*/
const
char
*
GetFullName
()
const
;
std
::
string
const
&
GetFullName
()
const
;
/**
* Check if the given name matches this group's regex.
...
...
Source/cmVisualStudio10TargetGenerator.cxx
View file @
c871446a
...
...
@@ -1472,8 +1472,8 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
for
(
std
::
set
<
cmSourceGroup
*>::
iterator
g
=
groupsUsed
.
begin
();
g
!=
groupsUsed
.
end
();
++
g
)
{
cmSourceGroup
*
sg
=
*
g
;
const
char
*
name
=
sg
->
GetFullName
();
if
(
strlen
(
name
)
!=
0
)
{
std
::
string
const
&
name
=
sg
->
GetFullName
();
if
(
!
name
.
empty
()
)
{
this
->
WriteString
(
"<Filter Include=
\"
"
,
2
);
(
*
this
->
BuildFileStream
)
<<
name
<<
"
\"
>
\n
"
;
std
::
string
guidName
=
"SG_Filter_"
;
...
...
@@ -1558,12 +1558,12 @@ void cmVisualStudio10TargetGenerator::WriteGroupSources(
std
::
string
const
&
source
=
sf
->
GetFullPath
();
cmSourceGroup
*
sourceGroup
=
this
->
Makefile
->
FindSourceGroup
(
source
.
c_str
(),
sourceGroups
);
const
char
*
filter
=
sourceGroup
->
GetFullName
();
std
::
string
const
&
filter
=
sourceGroup
->
GetFullName
();
this
->
WriteString
(
"<"
,
2
);
std
::
string
path
=
this
->
ConvertPath
(
source
,
s
->
RelativePath
);
this
->
ConvertToWindowsSlash
(
path
);
(
*
this
->
BuildFileStream
)
<<
name
<<
" Include=
\"
"
<<
cmVS10EscapeXML
(
path
);
if
(
strlen
(
filter
))
{
if
(
!
filter
.
empty
(
))
{
(
*
this
->
BuildFileStream
)
<<
"
\"
>
\n
"
;
this
->
WriteString
(
"<Filter>"
,
3
);
(
*
this
->
BuildFileStream
)
<<
filter
<<
"</Filter>
\n
"
;
...
...
Brad King
@brad.king
mentioned in commit
521cb89e
·
Nov 20, 2017
mentioned in commit
521cb89e
mentioned in commit 521cb89e0254323bf29395ce6bdefd6a112a009d
Toggle commit list
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