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
13b60f71
Commit
13b60f71
authored
Aug 08, 2003
by
Ken Martin
Browse files
fid post build iue on vs6 utility targets
parent
b6ac54c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/cmLocalVisualStudio6Generator.cxx
View file @
13b60f71
...
...
@@ -232,6 +232,40 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
this
->
AddDSPBuildRule
();
}
// for utility targets need custom command since post build doesn't
// do anything (Visual Studio 7 seems to do this correctly without
// the hack)
if
(
target
.
GetType
()
==
cmTarget
::
UTILITY
&&
target
.
GetPostBuildCommands
().
size
())
{
int
count
=
1
;
for
(
std
::
vector
<
cmCustomCommand
>::
const_iterator
cr
=
target
.
GetPostBuildCommands
().
begin
();
cr
!=
target
.
GetPostBuildCommands
().
end
();
++
cr
)
{
cmCustomCommand
cc
(
*
cr
);
cc
.
ExpandVariables
(
*
m_Makefile
);
char
*
output
=
new
char
[
strlen
(
m_Makefile
->
GetStartOutputDirectory
())
+
strlen
(
libName
)
+
30
];
sprintf
(
output
,
"%s/%s_force_%i"
,
m_Makefile
->
GetStartOutputDirectory
(),
libName
,
count
);
std
::
vector
<
std
::
string
>
args
;
args
.
push_back
(
cc
.
GetArguments
());
m_Makefile
->
AddCustomCommandToOutput
(
output
,
cc
.
GetCommand
().
c_str
(),
args
,
0
,
cc
.
GetDepends
());
cmSourceFile
*
outsf
=
m_Makefile
->
GetSourceFileWithOutput
(
output
);
target
.
GetSourceFiles
().
push_back
(
outsf
);
count
++
;
delete
[]
output
;
}
}
// trace the visual studio dependencies
std
::
string
name
=
libName
;
name
+=
".dsp.cmake"
;
...
...
@@ -280,6 +314,7 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
// Write the DSP file's header.
this
->
WriteDSPHeader
(
fout
,
libName
,
target
,
sourceGroups
);
// Loop through every source group.
for
(
std
::
vector
<
cmSourceGroup
>::
const_iterator
sg
=
sourceGroups
.
begin
();
sg
!=
sourceGroups
.
end
();
++
sg
)
...
...
@@ -560,7 +595,7 @@ cmLocalVisualStudio6Generator::CreateTargetRules(const cmTarget &target,
{
std
::
string
customRuleCode
=
""
;
if
(
target
.
GetType
()
>
cmTarget
::
UTILITY
)
if
(
target
.
GetType
()
>
=
cmTarget
::
UTILITY
)
{
return
customRuleCode
;
}
...
...
Write
Preview
Supports
Markdown
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