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
a1cfc4fe
Commit
a1cfc4fe
authored
Oct 07, 2016
by
Stephen Kelly
Browse files
cmMakefile: Simplify programmer error to an assert
parent
4079ba20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/cmMakefile.cxx
View file @
a1cfc4fe
...
...
@@ -1832,14 +1832,9 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname,
const
std
::
vector
<
std
::
string
>&
srcs
,
bool
excludeFromAll
)
{
// wrong type ? default to STATIC
if
((
type
!=
cmState
::
STATIC_LIBRARY
)
&&
(
type
!=
cmState
::
SHARED_LIBRARY
)
&&
(
type
!=
cmState
::
MODULE_LIBRARY
)
&&
(
type
!=
cmState
::
OBJECT_LIBRARY
)
&&
(
type
!=
cmState
::
INTERFACE_LIBRARY
))
{
this
->
IssueMessage
(
cmake
::
INTERNAL_ERROR
,
"cmMakefile::AddLibrary given invalid target type."
);
type
=
cmState
::
STATIC_LIBRARY
;
}
assert
(
type
==
cmState
::
STATIC_LIBRARY
||
type
==
cmState
::
SHARED_LIBRARY
||
type
==
cmState
::
MODULE_LIBRARY
||
type
==
cmState
::
OBJECT_LIBRARY
||
type
==
cmState
::
INTERFACE_LIBRARY
);
cmTarget
*
target
=
this
->
AddNewTarget
(
type
,
lname
);
// Clear its dependencies. Otherwise, dependencies might persist
...
...
Brad King
@brad.king
Mentioned in commit
1e6aaefd
·
Oct 10, 2016
Mentioned in commit
1e6aaefd
Mentioned in commit 1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a
Toggle commit list
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