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
8d8c3be7
Commit
8d8c3be7
authored
Aug 19, 2005
by
Andy Cedilnik
Browse files
BUG: If the scanner is not defined this would crash. For example when using new language
parent
904305e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/cmLocalUnixMakefileGenerator3.cxx
View file @
8d8c3be7
...
...
@@ -2830,26 +2830,26 @@ cmLocalUnixMakefileGenerator3
}
#endif
// for each file we need to scan
std
::
string
srcLang
=
"CMAKE_DEPENDS_CHECK_"
;
srcLang
+=
lang
;
const
char
*
srcStr
=
mf
->
GetSafeDefinition
(
srcLang
.
c_str
());
std
::
vector
<
std
::
string
>
srcs
;
cmSystemTools
::
ExpandListArgument
(
srcStr
,
srcs
);
for
(
std
::
vector
<
std
::
string
>::
iterator
si
=
srcs
.
begin
();
si
!=
srcs
.
end
();
++
si
)
{
std
::
string
&
src
=
*
si
;
++
si
;
// make sure the object file is relative to home output
std
::
string
obj
=
*
si
;
obj
=
lg
->
Convert
(
obj
.
c_str
(),
HOME_OUTPUT
,
MAKEFILE
);
scanner
->
Write
(
src
.
c_str
(),
obj
.
c_str
(),
ruleFileStream
);
}
// free the scanner for this language
if
(
scanner
)
{
// for each file we need to scan
std
::
string
srcLang
=
"CMAKE_DEPENDS_CHECK_"
;
srcLang
+=
lang
;
const
char
*
srcStr
=
mf
->
GetSafeDefinition
(
srcLang
.
c_str
());
std
::
vector
<
std
::
string
>
srcs
;
cmSystemTools
::
ExpandListArgument
(
srcStr
,
srcs
);
for
(
std
::
vector
<
std
::
string
>::
iterator
si
=
srcs
.
begin
();
si
!=
srcs
.
end
();
++
si
)
{
std
::
string
&
src
=
*
si
;
++
si
;
// make sure the object file is relative to home output
std
::
string
obj
=
*
si
;
obj
=
lg
->
Convert
(
obj
.
c_str
(),
HOME_OUTPUT
,
MAKEFILE
);
scanner
->
Write
(
src
.
c_str
(),
obj
.
c_str
(),
ruleFileStream
);
}
// free the scanner for this language
delete
scanner
;
}
}
...
...
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