Commit 92c3cab2 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'split-cmState'

e6eecec7 cmListFileCache: Remove cmState header include
e3587ee0 cmTargetPropertyComputer: Add missing include
e0a84904 cmState: Split auxiliary classes into separate files
a91eaf38 cmState: Port dependents to new cmStateTypes header
27be1d81 cmState: Move extracted declarations to a separate file
34433c88 cmState: Remove compatibility typedefs
cde6eb62 cmState: Port dependent code to new cmStateSnapshot name
a9bf981a cmState: Move Snapshot type to separate namespace
17d27893 cmState: Port dependent code to new cmStateDirectory name
34bcec39 cmState: Move Directory class to separate namespace
2fe3e55d cmState: Move CacheEntryType enum to separate namespace
a49751fb cmState: Move TargetType enum to separate namespace
0060391d cmState: Move SnapshotType enum to separate namespace
5bc964ed cmState: Move PositionType to separate namespace
2dc40996 cmState: Move PolicyStackEntry to separate namespace
cb40af5d cmState: Move SnapshotDataType to separate namespace
...
parents e1043912 e6eecec7
......@@ -360,6 +360,11 @@ set(SRCS
cmSourceGroup.h
cmState.cxx
cmState.h
cmStateDirectory.cxx
cmStateDirectory.h
cmStateSnapshot.cxx
cmStateSnapshot.h
cmStateTypes.h
cmSystemTools.cxx
cmSystemTools.h
cmTarget.cxx
......
......@@ -8,7 +8,7 @@
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmXMLSafe.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
......
......@@ -10,6 +10,7 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTypeMacro.h"
#include "cm_auto_ptr.hxx"
......
......@@ -7,7 +7,7 @@
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
#include "cmake.h"
......
......@@ -22,6 +22,7 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmake.h"
......@@ -280,7 +281,7 @@ void cmCTestScriptHandler::CreateCMake()
this->CMake->AddCMakePaths();
this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
cmStateSnapshot snapshot = this->CMake->GetCurrentSnapshot();
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
snapshot.GetDirectory().SetCurrentSource(cwd);
snapshot.GetDirectory().SetCurrentBinary(cwd);
......
......@@ -8,6 +8,7 @@
#include "cmCurl.h"
#include "cmGeneratedFileStream.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
#include "cmake.h"
......
......@@ -10,6 +10,7 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
#include "cm_auto_ptr.hxx"
......
......@@ -3,7 +3,7 @@
#include "cmCursesBoolWidget.h"
#include "cmCursesWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include <string>
......@@ -11,7 +11,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left,
int top)
: cmCursesWidget(width, height, left, top)
{
this->Type = cmState::BOOL;
this->Type = cmStateEnums::BOOL;
set_field_fore(this->Field, A_NORMAL);
set_field_back(this->Field, A_STANDOUT);
field_opts_off(this->Field, O_STATIC);
......
......@@ -10,6 +10,7 @@
#include "cmCursesStringWidget.h"
#include "cmCursesWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmake.h"
......@@ -47,7 +48,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
const char* value = cm->GetState()->GetCacheEntryValue(key);
assert(value);
switch (cm->GetState()->GetCacheEntryType(key)) {
case cmState::BOOL:
case cmStateEnums::BOOL:
this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
if (cmSystemTools::IsOn(value)) {
static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(true);
......@@ -55,15 +56,15 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);
}
break;
case cmState::PATH:
case cmStateEnums::PATH:
this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1);
static_cast<cmCursesPathWidget*>(this->Entry)->SetString(value);
break;
case cmState::FILEPATH:
case cmStateEnums::FILEPATH:
this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1);
static_cast<cmCursesFilePathWidget*>(this->Entry)->SetString(value);
break;
case cmState::STRING: {
case cmStateEnums::STRING: {
const char* stringsProp =
cm->GetState()->GetCacheEntryProperty(key, "STRINGS");
if (stringsProp) {
......@@ -83,7 +84,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
}
break;
}
case cmState::UNINITIALIZED:
case cmStateEnums::UNINITIALIZED:
cmSystemTools::Error("Found an undefined variable: ", key.c_str());
break;
default:
......
......@@ -3,13 +3,13 @@
#include "cmCursesDummyWidget.h"
#include "cmCursesWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left,
int top)
: cmCursesWidget(width, height, left, top)
{
this->Type = cmState::INTERNAL;
this->Type = cmStateEnums::INTERNAL;
}
bool cmCursesDummyWidget::HandleInput(int& /*key*/, cmCursesMainForm* /*fm*/,
......
......@@ -3,11 +3,11 @@
#include "cmCursesFilePathWidget.h"
#include "cmCursesPathWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left,
int top)
: cmCursesPathWidget(width, height, left, top)
{
this->Type = cmState::FILEPATH;
this->Type = cmStateEnums::FILEPATH;
}
......@@ -12,6 +12,7 @@
#include "cmCursesStringWidget.h"
#include "cmCursesWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
......@@ -106,10 +107,10 @@ void cmCursesMainForm::InitializeUI()
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
it != cacheKeys.end(); ++it) {
cmState::CacheEntryType t =
cmStateEnums::CacheEntryType t =
this->CMakeInstance->GetState()->GetCacheEntryType(*it);
if (t != cmState::INTERNAL && t != cmState::STATIC &&
t != cmState::UNINITIALIZED) {
if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC &&
t != cmStateEnums::UNINITIALIZED) {
++count;
}
}
......@@ -130,10 +131,10 @@ void cmCursesMainForm::InitializeUI()
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
it != cacheKeys.end(); ++it) {
std::string key = *it;
cmState::CacheEntryType t =
cmStateEnums::CacheEntryType t =
this->CMakeInstance->GetState()->GetCacheEntryType(*it);
if (t == cmState::INTERNAL || t == cmState::STATIC ||
t == cmState::UNINITIALIZED) {
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
t == cmStateEnums::UNINITIALIZED) {
continue;
}
......@@ -148,10 +149,10 @@ void cmCursesMainForm::InitializeUI()
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
it != cacheKeys.end(); ++it) {
std::string key = *it;
cmState::CacheEntryType t =
cmStateEnums::CacheEntryType t =
this->CMakeInstance->GetState()->GetCacheEntryType(*it);
if (t == cmState::INTERNAL || t == cmState::STATIC ||
t == cmState::UNINITIALIZED) {
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
t == cmStateEnums::UNINITIALIZED) {
continue;
}
......@@ -249,8 +250,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
cmCursesWidget* cw =
reinterpret_cast<cmCursesWidget*>(field_userptr(currentField));
// If in edit mode, get out of it
if (cw->GetType() == cmState::STRING || cw->GetType() == cmState::PATH ||
cw->GetType() == cmState::FILEPATH) {
if (cw->GetType() == cmStateEnums::STRING ||
cw->GetType() == cmStateEnums::PATH ||
cw->GetType() == cmStateEnums::FILEPATH) {
cmCursesStringWidget* sw = static_cast<cmCursesStringWidget*>(cw);
sw->SetInEdit(false);
}
......@@ -704,7 +706,7 @@ void cmCursesMainForm::FillCacheManagerFromUI()
std::string newValue = (*this->Entries)[i]->Entry->GetValue();
std::string fixedOldValue;
std::string fixedNewValue;
cmState::CacheEntryType t =
cmStateEnums::CacheEntryType t =
this->CMakeInstance->GetState()->GetCacheEntryType(cacheKey);
this->FixValue(t, oldValue, fixedOldValue);
this->FixValue(t, newValue, fixedNewValue);
......@@ -720,14 +722,14 @@ void cmCursesMainForm::FillCacheManagerFromUI()
}
}
void cmCursesMainForm::FixValue(cmState::CacheEntryType type,
void cmCursesMainForm::FixValue(cmStateEnums::CacheEntryType type,
const std::string& in, std::string& out) const
{
out = in.substr(0, in.find_last_not_of(' ') + 1);
if (type == cmState::PATH || type == cmState::FILEPATH) {
if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) {
cmSystemTools::ConvertToUnixSlashes(out);
}
if (type == cmState::BOOL) {
if (type == cmStateEnums::BOOL) {
if (cmSystemTools::IsOff(out.c_str())) {
out = "OFF";
} else {
......
......@@ -7,7 +7,7 @@
#include "cmCursesForm.h"
#include "cmCursesStandardIncludes.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include <stddef.h>
#include <string>
......@@ -110,7 +110,7 @@ protected:
// cache.
void FillCacheManagerFromUI();
// Fix formatting of values to a consistent form.
void FixValue(cmState::CacheEntryType type, const std::string& in,
void FixValue(cmStateEnums::CacheEntryType type, const std::string& in,
std::string& out) const;
// Re-post the existing fields. Used to toggle between
// normal and advanced modes. Render() should be called
......
......@@ -3,7 +3,7 @@
#include "cmCursesOptionsWidget.h"
#include "cmCursesWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
#define ctrl(z) ((z)&037)
......@@ -11,7 +11,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left,
int top)
: cmCursesWidget(width, height, left, top)
{
this->Type = cmState::BOOL; // this is a bit of a hack
this->Type = cmStateEnums::BOOL; // this is a bit of a hack
// there is no option type, and string type causes ccmake to cast
// the widget into a string widget at some point. BOOL is safe for
// now.
......
......@@ -4,7 +4,7 @@
#include "cmCursesMainForm.h"
#include "cmCursesStringWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include <vector>
......@@ -13,7 +13,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left,
int top)
: cmCursesStringWidget(width, height, left, top)
{
this->Type = cmState::PATH;
this->Type = cmStateEnums::PATH;
this->Cycle = false;
this->CurrentIndex = 0;
}
......@@ -50,7 +50,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
std::vector<std::string> dirs;
cmSystemTools::SimpleGlob(glob, dirs,
(this->Type == cmState::PATH ? -1 : 0));
(this->Type == cmStateEnums::PATH ? -1 : 0));
if (this->CurrentIndex < dirs.size()) {
cstr = dirs[this->CurrentIndex];
}
......
......@@ -6,7 +6,7 @@
#include "cmCursesMainForm.h"
#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include <stdio.h>
#include <string.h>
......@@ -21,7 +21,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left,
: cmCursesWidget(width, height, left, top)
{
this->InEdit = false;
this->Type = cmState::STRING;
this->Type = cmStateEnums::STRING;
set_field_fore(this->Field, A_NORMAL);
set_field_back(this->Field, A_STANDOUT);
field_opts_off(this->Field, O_STATIC);
......
......@@ -6,7 +6,7 @@
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmCursesStandardIncludes.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include <string>
......@@ -41,7 +41,7 @@ public:
/**
* Get the type of the widget (STRING, PATH etc...)
*/
cmState::CacheEntryType GetType() { return this->Type; }
cmStateEnums::CacheEntryType GetType() { return this->Type; }
/**
* If there are any, print the widget specific commands
......@@ -62,7 +62,7 @@ protected:
cmCursesWidget(const cmCursesWidget& from);
void operator=(const cmCursesWidget&);
cmState::CacheEntryType Type;
cmStateEnums::CacheEntryType Type;
std::string Value;
FIELD* Field;
// The page in the main form this widget is in
......
......@@ -196,8 +196,8 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
it != cacheKeys.end(); ++it) {
cmState::CacheEntryType t = state->GetCacheEntryType(*it);
if (t == cmState::INTERNAL || t == cmState::STATIC) {
cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*it);
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC) {
continue;
}
......@@ -232,19 +232,19 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
if (s.Type == QCMakeProperty::BOOL) {
this->CMakeInstance->AddCacheEntry(
s.Key.toLocal8Bit().data(), s.Value.toBool() ? "ON" : "OFF",
s.Help.toLocal8Bit().data(), cmState::BOOL);
s.Help.toLocal8Bit().data(), cmStateEnums::BOOL);
} else if (s.Type == QCMakeProperty::STRING) {
this->CMakeInstance->AddCacheEntry(
s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
s.Help.toLocal8Bit().data(), cmState::STRING);
s.Help.toLocal8Bit().data(), cmStateEnums::STRING);
} else if (s.Type == QCMakeProperty::PATH) {
this->CMakeInstance->AddCacheEntry(
s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
s.Help.toLocal8Bit().data(), cmState::PATH);
s.Help.toLocal8Bit().data(), cmStateEnums::PATH);
} else if (s.Type == QCMakeProperty::FILEPATH) {
this->CMakeInstance->AddCacheEntry(
s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
s.Help.toLocal8Bit().data(), cmState::FILEPATH);
s.Help.toLocal8Bit().data(), cmStateEnums::FILEPATH);
}
}
......@@ -259,9 +259,9 @@ QCMakePropertyList QCMake::properties() const
std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
for (std::vector<std::string>::const_iterator i = cacheKeys.begin();
i != cacheKeys.end(); ++i) {
cmState::CacheEntryType t = state->GetCacheEntryType(*i);
if (t == cmState::INTERNAL || t == cmState::STATIC ||
t == cmState::UNINITIALIZED) {
cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*i);
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
t == cmStateEnums::UNINITIALIZED) {
continue;
}
......@@ -273,14 +273,14 @@ QCMakePropertyList QCMake::properties() const
QString::fromLocal8Bit(state->GetCacheEntryProperty(*i, "HELPSTRING"));
prop.Value = QString::fromLocal8Bit(cachedValue);
prop.Advanced = state->GetCacheEntryPropertyAsBool(*i, "ADVANCED");
if (t == cmState::BOOL) {
if (t == cmStateEnums::BOOL) {
prop.Type = QCMakeProperty::BOOL;
prop.Value = cmSystemTools::IsOn(cachedValue);
} else if (t == cmState::PATH) {
} else if (t == cmStateEnums::PATH) {
prop.Type = QCMakeProperty::PATH;
} else if (t == cmState::FILEPATH) {
} else if (t == cmStateEnums::FILEPATH) {
prop.Type = QCMakeProperty::FILEPATH;
} else if (t == cmState::STRING) {
} else if (t == cmStateEnums::STRING) {
prop.Type = QCMakeProperty::STRING;
const char* stringsProperty =
state->GetCacheEntryProperty(*i, "STRINGS");
......
......@@ -133,8 +133,8 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args,
this->SetError(e.str());
return false;
}
cmState::TargetType type = aliasedTarget->GetType();
if (type != cmState::EXECUTABLE) {
cmStateEnums::TargetType type = aliasedTarget->GetType();
if (type != cmStateEnums::EXECUTABLE) {
std::ostringstream e;
e << "cannot create ALIAS target \"" << exename << "\" because target \""
<< aliasedName << "\" is not an "
......@@ -165,7 +165,7 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args,
}
// Create the imported target.
this->Makefile->AddImportedTarget(exename, cmState::EXECUTABLE,
this->Makefile->AddImportedTarget(exename, cmStateEnums::EXECUTABLE,
importGlobal);
return true;
}
......
......@@ -3,6 +3,7 @@
#include "cmAddLibraryCommand.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmake.h"
// cmLibraryCommand
......@@ -15,10 +16,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
}
// Library type defaults to value of BUILD_SHARED_LIBS, if it exists,
// otherwise it defaults to static library.
cmState::TargetType type = cmState::SHARED_LIBRARY;
cmStateEnums::TargetType type = cmStateEnums::SHARED_LIBRARY;
if (cmSystemTools::IsOff(
this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) {
type = cmState::STATIC_LIBRARY;
type = cmStateEnums::STATIC_LIBRARY;
}
bool excludeFromAll = false;
bool importTarget = false;
......@@ -38,57 +39,57 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
while (s != args.end()) {
std::string libType = *s;
if (libType == "STATIC") {
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
std::ostringstream e;
e << "INTERFACE library specified with conflicting STATIC type.";
this->SetError(e.str());
return false;
}
++s;
type = cmState::STATIC_LIBRARY;
type = cmStateEnums::STATIC_LIBRARY;
haveSpecifiedType = true;
} else if (libType == "SHARED") {
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
std::ostringstream e;
e << "INTERFACE library specified with conflicting SHARED type.";
this->SetError(e.str());
return false;
}
++s;
type = cmState::SHARED_LIBRARY;
type = cmStateEnums::SHARED_LIBRARY;
haveSpecifiedType = true;
} else if (libType == "MODULE") {
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
std::ostringstream e;
e << "INTERFACE library specified with conflicting MODULE type.";
this->SetError(e.str());
return false;
}
++s;
type = cmState::MODULE_LIBRARY;
type = cmStateEnums::MODULE_LIBRARY;
haveSpecifiedType = true;
} else if (libType == "OBJECT") {
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
std::ostringstream e;
e << "INTERFACE library specified with conflicting OBJECT type.";
this->SetError(e.str());
return false;
}
++s;
type = cmState::OBJECT_LIBRARY;
type = cmStateEnums::OBJECT_LIBRARY;
haveSpecifiedType = true;
} else if (libType == "UNKNOWN") {
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
std::ostringstream e;
e << "INTERFACE library specified with conflicting UNKNOWN type.";
this->SetError(e.str());
return false;
}
++s;
type = cmState::UNKNOWN_LIBRARY;
type = cmStateEnums::UNKNOWN_LIBRARY;
haveSpecifiedType = true;
} else if (libType == "ALIAS") {
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
std::ostringstream e;
e << "INTERFACE library specified with conflicting ALIAS type.";
this->SetError(e.str());
......@@ -116,10 +117,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
return false;
}
++s;
type = cmState::INTERFACE_LIBRARY;
type = cmStateEnums::INTERFACE_LIBRARY;
haveSpecifiedType = true;
} else if (*s == "EXCLUDE_FROM_ALL") {
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
std::ostringstream e;
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
this->SetError(e.str());
......@@ -133,7 +134,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
} else if (importTarget && *s == "GLOBAL") {
++s;
importGlobal = true;
} else if (type == cmState::INTERFACE_LIBRARY && *s == "GLOBAL") {
} else if (type == cmStateEnums::INTERFACE_LIBRARY && *s == "GLOBAL") {
std::ostringstream e;
e << "GLOBAL option may only be used with IMPORTED libraries.";
this->SetError(e.str());
......@@ -143,7 +144,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
}
}
if (type == cmState::INTERFACE_LIBRARY) {
if (type == cmStateEnums::INTERFACE_LIBRARY) {
if (s != args.end()) {
std::ostringstream e;
e << "INTERFACE library requires no source arguments.";
......@@ -170,7 +171,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
bool issueMessage = false;
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0037)) {