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
444dbd33
Commit
444dbd33
authored
Sep 15, 2004
by
Bill Hoffman
Browse files
BUG: fix external project command for VS 7 and 71
parent
f545c514
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/cmGlobalVisualStudio71Generator.cxx
View file @
444dbd33
...
...
@@ -302,6 +302,46 @@ void cmGlobalVisualStudio71Generator::WriteProjectDepends(std::ostream& fout,
}
}
// Write a dsp file into the SLN file,
// Note, that dependencies from executables to
// the libraries it uses are also done here
void
cmGlobalVisualStudio71Generator
::
WriteExternalProject
(
std
::
ostream
&
fout
,
const
char
*
name
,
const
char
*
location
,
const
std
::
vector
<
std
::
string
>&
depends
)
{
std
::
string
d
=
cmSystemTools
::
ConvertToOutputPath
(
location
);
fout
<<
"Project(
\"
{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
\"
) =
\"
"
<<
name
<<
"
\"
,
\"
"
<<
d
<<
"
\"
,
\"
{"
<<
this
->
GetGUID
(
name
)
<<
"}
\"\n
"
;
// write out the dependencies here
// VS 7.1 includes dependencies with the project instead of in the global section
if
(
!
depends
.
empty
())
{
fout
<<
"
\t
ProjectSection(ProjectDependencies) = postProject
\n
"
;
std
::
vector
<
std
::
string
>::
const_iterator
it
;
for
(
it
=
depends
.
begin
();
it
!=
depends
.
end
();
++
it
)
{
if
(
it
->
size
()
>
0
)
{
fout
<<
"
\t\t
{"
<<
this
->
GetGUID
(
it
->
c_str
())
<<
"} = {"
<<
this
->
GetGUID
(
it
->
c_str
())
<<
"}
\n
"
;
}
}
fout
<<
"
\t
EndProjectSection
\n
"
;
}
fout
<<
"EndProject
\n
"
;
}
// Write a dsp file into the SLN file,
// Note, that dependencies from executables to
...
...
Source/cmGlobalVisualStudio71Generator.h
View file @
444dbd33
...
...
@@ -53,6 +53,8 @@ protected:
const
char
*
name
,
const
char
*
path
,
const
cmTarget
&
t
);
virtual
void
WriteProjectConfigurations
(
std
::
ostream
&
fout
,
const
char
*
name
,
bool
in_all
);
virtual
void
WriteExternalProject
(
std
::
ostream
&
fout
,
const
char
*
name
,
const
char
*
path
,
const
std
::
vector
<
std
::
string
>&
depends
);
virtual
void
WriteSLNFooter
(
std
::
ostream
&
fout
);
virtual
void
WriteSLNHeader
(
std
::
ostream
&
fout
);
};
...
...
Source/cmGlobalVisualStudio7Generator.cxx
View file @
444dbd33
...
...
@@ -475,9 +475,22 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
for
(
std
::
vector
<
std
::
string
>::
iterator
si
=
dspnames
.
begin
();
l
!=
tgts
.
end
()
&&
si
!=
dspnames
.
end
();
++
l
)
{
if
((
l
->
second
.
GetType
()
!=
cmTarget
::
INSTALL_FILES
)
&&
(
l
->
second
.
GetType
()
!=
cmTarget
::
INSTALL_PROGRAMS
)
&&
(
strncmp
(
l
->
first
.
c_str
(),
"INCLUDE_EXTERNAL_MSPROJECT"
,
26
)
!=
0
)
)
if
(
strncmp
(
l
->
first
.
c_str
(),
"INCLUDE_EXTERNAL_MSPROJECT"
,
26
)
==
0
)
{
cmCustomCommand
cc
=
l
->
second
.
GetPostBuildCommands
()[
0
];
std
::
string
name
=
cc
.
GetCommand
();
std
::
vector
<
std
::
string
>
depends
=
cc
.
GetDepends
();
std
::
vector
<
std
::
string
>::
iterator
iter
;
int
depcount
=
0
;
for
(
iter
=
depends
.
begin
();
iter
!=
depends
.
end
();
++
iter
)
{
fout
<<
"
\t\t
{"
<<
this
->
GetGUID
(
name
.
c_str
())
<<
"}."
<<
depcount
<<
" = {"
<<
this
->
GetGUID
(
iter
->
c_str
())
<<
"}
\n
"
;
depcount
++
;
}
}
else
if
((
l
->
second
.
GetType
()
!=
cmTarget
::
INSTALL_FILES
)
&&
(
l
->
second
.
GetType
()
!=
cmTarget
::
INSTALL_PROGRAMS
))
{
this
->
WriteProjectDepends
(
fout
,
si
->
c_str
(),
dir
.
c_str
(),
l
->
second
);
++
si
;
...
...
@@ -630,7 +643,7 @@ cmGlobalVisualStudio7Generator::WriteProjectConfigurations(std::ostream& fout,
void
cmGlobalVisualStudio7Generator
::
WriteExternalProject
(
std
::
ostream
&
fout
,
const
char
*
name
,
const
char
*
location
,
const
std
::
vector
<
std
::
string
>&
depends
)
const
std
::
vector
<
std
::
string
>&
)
{
std
::
string
d
=
cmSystemTools
::
ConvertToOutputPath
(
location
);
fout
<<
"Project(
\"
{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
\"
) =
\"
"
...
...
@@ -638,24 +651,6 @@ void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout,
<<
d
<<
"
\"
,
\"
{"
<<
this
->
GetGUID
(
name
)
<<
"}
\"\n
"
;
if
(
!
depends
.
empty
())
{
fout
<<
"
\t
ProjectSection(ProjectDependencies) = postProject
\n
"
;
std
::
vector
<
std
::
string
>::
const_iterator
it
;
for
(
it
=
depends
.
begin
();
it
!=
depends
.
end
();
++
it
)
{
if
(
it
->
size
()
>
0
)
{
fout
<<
"
\t\t
{"
<<
this
->
GetGUID
(
it
->
c_str
())
<<
"} = {"
<<
this
->
GetGUID
(
it
->
c_str
())
<<
"}
\n
"
;
}
}
fout
<<
"
\t
EndProjectSection
\n
"
;
}
fout
<<
"EndProject
\n
"
;
}
...
...
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