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
cc6b948e
Commit
cc6b948e
authored
Sep 07, 2016
by
Daniel Pfeifer
Browse files
cmGeneratorTarget: factor out common part of AddSources commands
parent
52052ef8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/cmGeneratorTarget.cxx
View file @
cc6b948e
...
...
@@ -468,9 +468,8 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config,
return
i
->
second
;
}
void
cmGeneratorTarget
::
AddSource
(
const
std
::
string
&
src
)
void
cmGeneratorTarget
::
AddSource
Common
(
const
std
::
string
&
src
)
{
this
->
Target
->
AddSource
(
src
);
cmListFileBacktrace
lfbt
=
this
->
Makefile
->
GetBacktrace
();
cmGeneratorExpression
ge
(
lfbt
);
CM_AUTO_PTR
<
cmCompiledGeneratorExpression
>
cge
=
ge
.
Parse
(
src
);
...
...
@@ -480,19 +479,17 @@ void cmGeneratorTarget::AddSource(const std::string& src)
this
->
LinkImplementationLanguageIsContextDependent
=
true
;
}
void
cmGeneratorTarget
::
AddSource
(
const
std
::
string
&
src
)
{
this
->
Target
->
AddSource
(
src
);
this
->
AddSourceCommon
(
src
);
}
void
cmGeneratorTarget
::
AddTracedSources
(
std
::
vector
<
std
::
string
>
const
&
srcs
)
{
this
->
Target
->
AddTracedSources
(
srcs
);
if
(
!
srcs
.
empty
())
{
std
::
string
srcFiles
=
cmJoin
(
srcs
,
";"
);
this
->
SourceFilesMap
.
clear
();
this
->
LinkImplementationLanguageIsContextDependent
=
true
;
cmListFileBacktrace
lfbt
=
this
->
Makefile
->
GetBacktrace
();
cmGeneratorExpression
ge
(
lfbt
);
CM_AUTO_PTR
<
cmCompiledGeneratorExpression
>
cge
=
ge
.
Parse
(
srcFiles
);
cge
->
SetEvaluateForBuildsystem
(
true
);
this
->
SourceEntries
.
push_back
(
new
cmGeneratorTarget
::
TargetPropertyEntry
(
cge
));
this
->
AddSourceCommon
(
cmJoin
(
srcs
,
";"
));
}
}
...
...
Source/cmGeneratorTarget.h
View file @
cc6b948e
...
...
@@ -540,6 +540,8 @@ public:
std
::
string
GetFortranModuleDirectory
()
const
;
private:
void
AddSourceCommon
(
const
std
::
string
&
src
);
std
::
string
CreateFortranModuleDirectory
()
const
;
mutable
bool
FortranModuleDirectoryCreated
;
mutable
std
::
string
FortranModuleDirectory
;
...
...
Brad King
@brad.king
mentioned in commit
2572b824
·
Sep 09, 2016
mentioned in commit
2572b824
mentioned in commit 2572b824d4b81de83a1b16dee84d8754e846522c
Toggle commit list
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