Skip to content
GitLab
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
5d19e8aa
Commit
5d19e8aa
authored
Feb 05, 2012
by
Peter Collingbourne
Browse files
Ninja: Appease various compilers
parent
bfe56f68
Changes
5
Hide whitespace changes
Inline
Side-by-side
Source/cmGlobalNinjaGenerator.cxx
View file @
5d19e8aa
...
...
@@ -367,7 +367,7 @@ void cmGlobalNinjaGenerator::Generate()
this
->
cmGlobalGenerator
::
Generate
();
this
->
WriteAssumedSourceDependencies
(
*
this
->
BuildFileStream
);
this
->
WriteAssumedSourceDependencies
();
this
->
WriteTargetAliases
(
*
this
->
BuildFileStream
);
this
->
WriteBuiltinTargets
(
*
this
->
BuildFileStream
);
...
...
@@ -591,15 +591,16 @@ void cmGlobalNinjaGenerator::AddDependencyToAll(cmTarget* target)
this
->
AppendTargetOutputs
(
target
,
this
->
AllDependencies
);
}
void
cmGlobalNinjaGenerator
::
WriteAssumedSourceDependencies
(
std
::
ostream
&
os
)
void
cmGlobalNinjaGenerator
::
WriteAssumedSourceDependencies
()
{
for
(
std
::
map
<
std
::
string
,
std
::
set
<
std
::
string
>
>::
iterator
i
=
this
->
AssumedSourceDependencies
.
begin
();
i
!=
this
->
AssumedSourceDependencies
.
end
();
++
i
)
{
cmNinjaDeps
deps
;
std
::
copy
(
i
->
second
.
begin
(),
i
->
second
.
end
(),
std
::
back_inserter
(
deps
));
WriteCustomCommandBuild
(
/*command=*/
""
,
/*description=*/
""
,
"Assume dependencies for generated source file."
,
cmNinjaDeps
(
1
,
i
->
first
),
cmNinjaDeps
(
i
->
second
.
begin
(),
i
->
second
.
end
()));
cmNinjaDeps
(
1
,
i
->
first
),
deps
);
}
}
...
...
@@ -653,7 +654,7 @@ cmGlobalNinjaGenerator
// Global targets only depend on other utilities, which may not appear in
// the TargetDepends set (e.g. "all").
std
::
set
<
cmStdString
>
const
&
utils
=
target
->
GetUtilities
();
outputs
.
insert
(
outputs
.
end
(),
utils
.
begin
(),
utils
.
end
(
));
std
::
copy
(
utils
.
begin
(),
utils
.
end
(),
std
::
back_inserter
(
outputs
));
}
else
{
cmTargetDependSet
const
&
targetDeps
=
this
->
GetTargetDirectDepends
(
*
target
);
...
...
Source/cmGlobalNinjaGenerator.h
View file @
5d19e8aa
...
...
@@ -255,7 +255,7 @@ private:
void
AddDependencyToAll
(
cmTarget
*
target
);
void
WriteAssumedSourceDependencies
(
std
::
ostream
&
os
);
void
WriteAssumedSourceDependencies
();
void
AppendTargetOutputs
(
cmTarget
*
target
,
cmNinjaDeps
&
outputs
);
void
AppendTargetDepends
(
cmTarget
*
target
,
cmNinjaDeps
&
outputs
);
...
...
Source/cmLocalNinjaGenerator.h
View file @
5d19e8aa
...
...
@@ -97,8 +97,8 @@ private:
struct
map_to_ninja_path
{
cmLocalNinjaGenerator
*
LocalGenerator
;
map_to_ninja_path
(
cmLocalNinjaGenerator
*
LocalGen
erator
)
:
LocalGenerator
(
LocalGen
erator
)
{}
map_to_ninja_path
(
cmLocalNinjaGenerator
*
LocalGen
)
:
LocalGenerator
(
LocalGen
)
{}
std
::
string
operator
()(
const
std
::
string
&
path
)
{
return
LocalGenerator
->
ConvertToNinjaPath
(
path
.
c_str
());
}
...
...
Source/cmNinjaNormalTargetGenerator.cxx
View file @
5d19e8aa
...
...
@@ -281,6 +281,7 @@ cmNinjaNormalTargetGenerator
default:
assert
(
0
&&
"Unexpected target type"
);
}
return
std
::
vector
<
std
::
string
>
();
}
void
cmNinjaNormalTargetGenerator
::
WriteLinkStatement
()
...
...
Source/cmNinjaUtilityTargetGenerator.cxx
View file @
5d19e8aa
...
...
@@ -39,8 +39,8 @@ void cmNinjaUtilityTargetGenerator::Generate()
this
->
GetLocalGenerator
()
->
AddCustomCommandTarget
(
cc
,
this
->
GetTarget
());
// Depend on all custom command outputs.
const
std
::
vector
<
std
::
string
>&
o
utputs
=
cc
->
GetOutputs
();
std
::
transform
(
o
utputs
.
begin
(),
o
utputs
.
end
(),
const
std
::
vector
<
std
::
string
>&
ccO
utputs
=
cc
->
GetOutputs
();
std
::
transform
(
ccO
utputs
.
begin
(),
ccO
utputs
.
end
(),
std
::
back_inserter
(
deps
),
MapToNinjaPath
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment