summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx33
1 files changed, 16 insertions, 17 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index f522cee..efa29e6 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -31,13 +31,13 @@ bool cmAddLibraryCommand
}
bool excludeFromAll = false;
bool importTarget = false;
-
+
std::vector<std::string>::const_iterator s = args.begin();
std::string libName = *s;
++s;
-
+
// If the second argument is "SHARED" or "STATIC", then it controls
// the type of library. Otherwise, it is treated as a source or
// source list name. There may be two keyword arguments, check for them
@@ -85,11 +85,11 @@ bool cmAddLibraryCommand
}
}
- /* ideally we should check whether for the linker language of the target
+ /* ideally we should check whether for the linker language of the target
CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to
- STATIC. But at this point we know only the name of the target, but not
+ STATIC. But at this point we know only the name of the target, but not
yet its linker language. */
- if ((type != cmTarget::STATIC_LIBRARY) &&
+ if ((type != cmTarget::STATIC_LIBRARY) &&
(this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
"TARGET_SUPPORTS_SHARED_LIBS") == false))
{
@@ -103,16 +103,16 @@ bool cmAddLibraryCommand
type = cmTarget::STATIC_LIBRARY;
}
- // The IMPORTED signature requires a type to be specified explicitly.
- if(importTarget && !haveSpecifiedType)
- {
- this->SetError("called with IMPORTED argument but no library type.");
- return false;
- }
-
// Handle imported target creation.
if(importTarget)
{
+ // The IMPORTED signature requires a type to be specified explicitly.
+ if (!haveSpecifiedType)
+ {
+ this->SetError("called with IMPORTED argument but no library type.");
+ return false;
+ }
+
// Make sure the target does not already exist.
if(this->Makefile->FindTargetToUse(libName.c_str()))
{
@@ -158,15 +158,14 @@ bool cmAddLibraryCommand
}
std::vector<std::string> srclists;
- while (s != args.end())
+ while (s != args.end())
{
- srclists.push_back(*s);
+ srclists.push_back(*s);
++s;
}
- this->Makefile->AddLibrary(libName.c_str(), type, srclists,
- excludeFromAll);
-
+ this->Makefile->AddLibrary(libName.c_str(), type, srclists, excludeFromAll);
+
return true;
}