summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index db2f6fb..a844cf1 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -12,6 +12,7 @@
#include "cmAddLibraryCommand.h"
#include "cmake.h"
+#include "cmState.h"
// cmLibraryCommand
bool cmAddLibraryCommand
@@ -221,8 +222,7 @@ bool cmAddLibraryCommand
case cmPolicies::WARN:
if(type != cmTarget::INTERFACE_LIBRARY)
{
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n";
issueMessage = true;
}
case cmPolicies::OLD:
@@ -330,7 +330,7 @@ bool cmAddLibraryCommand
yet its linker language. */
if ((type == cmTarget::SHARED_LIBRARY ||
type == cmTarget::MODULE_LIBRARY) &&
- (this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
+ (this->Makefile->GetState()->GetGlobalPropertyAsBool(
"TARGET_SUPPORTS_SHARED_LIBS") == false))
{
std::ostringstream w;
@@ -435,11 +435,7 @@ bool cmAddLibraryCommand
cmSystemTools::Message(msg.c_str() ,"Warning");
}
- while (s != args.end())
- {
- srclists.push_back(*s);
- ++s;
- }
+ srclists.insert(srclists.end(), s, args.end());
this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll);