diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-05-06 11:16:23 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-05-06 19:07:40 (GMT) |
commit | d648c4766ff56907bc17287077eeebcc9e40b184 (patch) | |
tree | 918f6ba2723c223212366a534c2726824a3d3626 /Source | |
parent | b8af20116854b51923da9ebef668fba0072b06c4 (diff) | |
download | CMake-d648c4766ff56907bc17287077eeebcc9e40b184.zip CMake-d648c4766ff56907bc17287077eeebcc9e40b184.tar.gz CMake-d648c4766ff56907bc17287077eeebcc9e40b184.tar.bz2 |
cmTarget: Don't assert on object libraries for configure-time location.
Commit b8af2011 (cmTarget: Fix listing of source files at
configure-time., 2014-04-13) refactored a GetObjectLibrariesCMP0026
method out of GetLanguages. In flight, a conditional use of a target
if available was changed to an assert-available.
This code is only used to read the LOCATION property at configure
time, when the link information is incomplete, and not all targets
are defined, so the assert is inappropriate, even though it can lead
to incorrect information being generated. CMP0026 warns about the
potentially incorrect information anyway.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 6a87342..9d96fd9 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -5406,8 +5406,10 @@ cmTarget::GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const continue; } cmTarget *objLib = this->Makefile->FindTargetToUse(objLibName.c_str()); - assert(objLib); - objlibs.push_back(objLib); + if(objLib) + { + objlibs.push_back(objLib); + } } } } |