Merge topic 'compiler-features'
7647f6af
Add CM_OVERRIDE to some functions5286110d
cxx features: add check for override09aa2c94
Use <unordered_set> where availableea5477e4
Make C++ feature checks extensible
This commit is contained in:
commit
d3544d023b
|
@ -67,7 +67,7 @@ if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||||
include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx11_unordered_map.cmake)
|
include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx_features.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# option to set the internal encoding of CMake to UTF-8
|
# option to set the internal encoding of CMake to UTF-8
|
||||||
|
|
|
@ -177,7 +177,7 @@ public:
|
||||||
bool patched;
|
bool patched;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void StartElement(const std::string& name, const char** atts)
|
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
xout.StartElement(name);
|
xout.StartElement(name);
|
||||||
StartFragment(atts);
|
StartFragment(atts);
|
||||||
|
@ -192,7 +192,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EndElement(const std::string& name)
|
void EndElement(const std::string& name) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "Updates" && !patched) {
|
if (name == "Updates" && !patched) {
|
||||||
repository->WriteRepositoryUpdates(xout);
|
repository->WriteRepositoryUpdates(xout);
|
||||||
|
@ -208,7 +208,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void CharacterDataHandler(const char* data, int length)
|
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
std::string content(data, data + length);
|
std::string content(data, data + length);
|
||||||
if (content == "" || content == " " || content == " " ||
|
if (content == "" || content == " " || content == " " ||
|
||||||
|
|
|
@ -101,7 +101,7 @@ private:
|
||||||
bool CheckOutFound;
|
bool CheckOutFound;
|
||||||
cmsys::RegularExpression RegexCheckOut;
|
cmsys::RegularExpression RegexCheckOut;
|
||||||
cmsys::RegularExpression RegexParent;
|
cmsys::RegularExpression RegexParent;
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexCheckOut.find(this->Line)) {
|
if (this->RegexCheckOut.find(this->Line)) {
|
||||||
this->BZR->URL = this->RegexCheckOut.match(1);
|
this->BZR->URL = this->RegexCheckOut.match(1);
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
private:
|
private:
|
||||||
std::string& Rev;
|
std::string& Rev;
|
||||||
cmsys::RegularExpression RegexRevno;
|
cmsys::RegularExpression RegexRevno;
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexRevno.find(this->Line)) {
|
if (this->RegexRevno.find(this->Line)) {
|
||||||
this->Rev = this->RegexRevno.match(1);
|
this->Rev = this->RegexRevno.match(1);
|
||||||
|
@ -185,7 +185,7 @@ public:
|
||||||
}
|
}
|
||||||
~LogParser() { this->CleanupParser(); }
|
~LogParser() { this->CleanupParser(); }
|
||||||
|
|
||||||
virtual int InitializeParser()
|
int InitializeParser() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
int res = cmXMLParser::InitializeParser();
|
int res = cmXMLParser::InitializeParser();
|
||||||
if (res) {
|
if (res) {
|
||||||
|
@ -207,14 +207,14 @@ private:
|
||||||
|
|
||||||
cmsys::RegularExpression EmailRegex;
|
cmsys::RegularExpression EmailRegex;
|
||||||
|
|
||||||
virtual bool ProcessChunk(const char* data, int length)
|
bool ProcessChunk(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->OutputLogger::ProcessChunk(data, length);
|
this->OutputLogger::ProcessChunk(data, length);
|
||||||
this->ParseChunk(data, length);
|
this->ParseChunk(data, length);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void StartElement(const std::string& name, const char**)
|
void StartElement(const std::string& name, const char**) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CData.clear();
|
this->CData.clear();
|
||||||
if (name == "log") {
|
if (name == "log") {
|
||||||
|
@ -239,12 +239,12 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void CharacterDataHandler(const char* data, int length)
|
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CData.insert(this->CData.end(), data, data + length);
|
this->CData.insert(this->CData.end(), data, data + length);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EndElement(const std::string& name)
|
void EndElement(const std::string& name) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "log") {
|
if (name == "log") {
|
||||||
this->BZR->DoRevision(this->Rev, this->Changes);
|
this->BZR->DoRevision(this->Rev, this->Changes);
|
||||||
|
@ -274,7 +274,7 @@ private:
|
||||||
this->CData.clear();
|
this->CData.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ReportError(int, int, const char* msg)
|
void ReportError(int, int, const char* msg) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->BZR->Log << "Error parsing bzr log xml: " << msg << "\n";
|
this->BZR->Log << "Error parsing bzr log xml: " << msg << "\n";
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ private:
|
||||||
cmCTestBZR* BZR;
|
cmCTestBZR* BZR;
|
||||||
cmsys::RegularExpression RegexUpdate;
|
cmsys::RegularExpression RegexUpdate;
|
||||||
|
|
||||||
virtual bool ProcessChunk(const char* first, int length)
|
bool ProcessChunk(const char* first, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
bool last_is_new_line = (*first == '\r' || *first == '\n');
|
bool last_is_new_line = (*first == '\r' || *first == '\n');
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ private:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexUpdate.find(this->Line)) {
|
if (this->RegexUpdate.find(this->Line)) {
|
||||||
this->DoPath(this->RegexUpdate.match(1)[0],
|
this->DoPath(this->RegexUpdate.match(1)[0],
|
||||||
|
@ -431,7 +431,7 @@ public:
|
||||||
private:
|
private:
|
||||||
cmCTestBZR* BZR;
|
cmCTestBZR* BZR;
|
||||||
cmsys::RegularExpression RegexStatus;
|
cmsys::RegularExpression RegexStatus;
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexStatus.find(this->Line)) {
|
if (this->RegexStatus.find(this->Line)) {
|
||||||
this->DoPath(this->RegexStatus.match(1)[0],
|
this->DoPath(this->RegexStatus.match(1)[0],
|
||||||
|
|
|
@ -53,7 +53,7 @@ private:
|
||||||
cmsys::RegularExpression RegexFileRemoved1;
|
cmsys::RegularExpression RegexFileRemoved1;
|
||||||
cmsys::RegularExpression RegexFileRemoved2;
|
cmsys::RegularExpression RegexFileRemoved2;
|
||||||
|
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexFileUpdated.find(this->Line)) {
|
if (this->RegexFileUpdated.find(this->Line)) {
|
||||||
this->DoFile(PathUpdated, this->RegexFileUpdated.match(2));
|
this->DoFile(PathUpdated, this->RegexFileUpdated.match(2));
|
||||||
|
@ -140,7 +140,7 @@ private:
|
||||||
SectionType Section;
|
SectionType Section;
|
||||||
Revision Rev;
|
Revision Rev;
|
||||||
|
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->Line == ("======================================="
|
if (this->Line == ("======================================="
|
||||||
"======================================")) {
|
"======================================")) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string& Line1;
|
std::string& Line1;
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
// Only the first line is of interest.
|
// Only the first line is of interest.
|
||||||
this->Line1 = this->Line;
|
this->Line1 = this->Line;
|
||||||
|
@ -355,7 +355,7 @@ protected:
|
||||||
this->Changes.clear();
|
this->Changes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->Line[0] == ':') {
|
if (this->Line[0] == ':') {
|
||||||
this->DiffField = DiffFieldChange;
|
this->DiffField = DiffFieldChange;
|
||||||
|
@ -513,7 +513,7 @@ private:
|
||||||
person.TimeZone = strtol(c, (char**)&c, 10);
|
person.TimeZone = strtol(c, (char**)&c, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->Line.empty()) {
|
if (this->Line.empty()) {
|
||||||
if (this->Section == SectionBody && this->LineEnd == '\0') {
|
if (this->Section == SectionBody && this->LineEnd == '\0') {
|
||||||
|
|
|
@ -41,7 +41,7 @@ private:
|
||||||
std::string& Rev;
|
std::string& Rev;
|
||||||
cmsys::RegularExpression RegexIdentify;
|
cmsys::RegularExpression RegexIdentify;
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexIdentify.find(this->Line)) {
|
if (this->RegexIdentify.find(this->Line)) {
|
||||||
this->Rev = this->RegexIdentify.match(1);
|
this->Rev = this->RegexIdentify.match(1);
|
||||||
|
@ -65,7 +65,7 @@ private:
|
||||||
cmCTestHG* HG;
|
cmCTestHG* HG;
|
||||||
cmsys::RegularExpression RegexStatus;
|
cmsys::RegularExpression RegexStatus;
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexStatus.find(this->Line)) {
|
if (this->RegexStatus.find(this->Line)) {
|
||||||
this->DoPath(this->RegexStatus.match(1)[0], this->RegexStatus.match(2));
|
this->DoPath(this->RegexStatus.match(1)[0], this->RegexStatus.match(2));
|
||||||
|
@ -182,14 +182,14 @@ private:
|
||||||
Change CurChange;
|
Change CurChange;
|
||||||
std::vector<char> CData;
|
std::vector<char> CData;
|
||||||
|
|
||||||
virtual bool ProcessChunk(const char* data, int length)
|
bool ProcessChunk(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->OutputLogger::ProcessChunk(data, length);
|
this->OutputLogger::ProcessChunk(data, length);
|
||||||
this->ParseChunk(data, length);
|
this->ParseChunk(data, length);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void StartElement(const std::string& name, const char** atts)
|
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CData.clear();
|
this->CData.clear();
|
||||||
if (name == "logentry") {
|
if (name == "logentry") {
|
||||||
|
@ -201,12 +201,12 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void CharacterDataHandler(const char* data, int length)
|
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CData.insert(this->CData.end(), data, data + length);
|
this->CData.insert(this->CData.end(), data, data + length);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EndElement(const std::string& name)
|
void EndElement(const std::string& name) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "logentry") {
|
if (name == "logentry") {
|
||||||
this->HG->DoRevision(this->Rev, this->Changes);
|
this->HG->DoRevision(this->Rev, this->Changes);
|
||||||
|
@ -261,7 +261,7 @@ private:
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ReportError(int, int, const char* msg)
|
void ReportError(int, int, const char* msg) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->HG->Log << "Error parsing hg log xml: " << msg << "\n";
|
this->HG->Log << "Error parsing hg log xml: " << msg << "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
this->CTest = c;
|
this->CTest = c;
|
||||||
this->SetErrorCallback(xmlReportError, (void*)c);
|
this->SetErrorCallback(xmlReportError, (void*)c);
|
||||||
}
|
}
|
||||||
void StartElement(const std::string& name, const char** atts)
|
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "MemoryLeak" || name == "ResourceLeak") {
|
if (name == "MemoryLeak" || name == "ResourceLeak") {
|
||||||
this->Errors.push_back(cmCTestMemCheckHandler::MLK);
|
this->Errors.push_back(cmCTestMemCheckHandler::MLK);
|
||||||
|
@ -78,7 +78,7 @@ public:
|
||||||
ostr << "\n";
|
ostr << "\n";
|
||||||
this->Log += ostr.str();
|
this->Log += ostr.str();
|
||||||
}
|
}
|
||||||
void EndElement(const std::string&) {}
|
void EndElement(const std::string&) CM_OVERRIDE {}
|
||||||
|
|
||||||
const char* GetAttribute(const char* name, const char** atts)
|
const char* GetAttribute(const char* name, const char** atts)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ private:
|
||||||
std::string& Rev;
|
std::string& Rev;
|
||||||
cmsys::RegularExpression RegexIdentify;
|
cmsys::RegularExpression RegexIdentify;
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexIdentify.find(this->Line)) {
|
if (this->RegexIdentify.find(this->Line)) {
|
||||||
this->Rev = this->RegexIdentify.match(1);
|
this->Rev = this->RegexIdentify.match(1);
|
||||||
|
@ -69,7 +69,7 @@ private:
|
||||||
cmsys::RegularExpression RegexIdentify;
|
cmsys::RegularExpression RegexIdentify;
|
||||||
cmCTestP4* P4;
|
cmCTestP4* P4;
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexIdentify.find(this->Line)) {
|
if (this->RegexIdentify.find(this->Line)) {
|
||||||
P4->ChangeLists.push_back(this->RegexIdentify.match(1));
|
P4->ChangeLists.push_back(this->RegexIdentify.match(1));
|
||||||
|
@ -92,7 +92,7 @@ private:
|
||||||
cmsys::RegularExpression RegexUser;
|
cmsys::RegularExpression RegexUser;
|
||||||
cmCTestP4* P4;
|
cmCTestP4* P4;
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexUser.find(this->Line)) {
|
if (this->RegexUser.find(this->Line)) {
|
||||||
User NewUser;
|
User NewUser;
|
||||||
|
@ -135,7 +135,7 @@ private:
|
||||||
std::string CurrentPath;
|
std::string CurrentPath;
|
||||||
cmsys::RegularExpression RegexDiff;
|
cmsys::RegularExpression RegexDiff;
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!this->Line.empty() && this->Line[0] == '=' &&
|
if (!this->Line.empty() && this->Line[0] == '=' &&
|
||||||
this->RegexDiff.find(this->Line)) {
|
this->RegexDiff.find(this->Line)) {
|
||||||
|
@ -225,7 +225,7 @@ private:
|
||||||
SectionType Section;
|
SectionType Section;
|
||||||
Revision Rev;
|
Revision Rev;
|
||||||
|
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->Line.empty()) {
|
if (this->Line.empty()) {
|
||||||
this->NextSection();
|
this->NextSection();
|
||||||
|
|
|
@ -62,7 +62,7 @@ private:
|
||||||
cmsys::RegularExpression RegexRev;
|
cmsys::RegularExpression RegexRev;
|
||||||
cmsys::RegularExpression RegexURL;
|
cmsys::RegularExpression RegexURL;
|
||||||
cmsys::RegularExpression RegexRoot;
|
cmsys::RegularExpression RegexRoot;
|
||||||
virtual bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexRev.find(this->Line)) {
|
if (this->RegexRev.find(this->Line)) {
|
||||||
this->Rev = this->RegexRev.match(1);
|
this->Rev = this->RegexRev.match(1);
|
||||||
|
@ -206,7 +206,7 @@ private:
|
||||||
cmCTestSVN* SVN;
|
cmCTestSVN* SVN;
|
||||||
cmsys::RegularExpression RegexUpdate;
|
cmsys::RegularExpression RegexUpdate;
|
||||||
|
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexUpdate.find(this->Line)) {
|
if (this->RegexUpdate.find(this->Line)) {
|
||||||
this->DoPath(this->RegexUpdate.match(1)[0],
|
this->DoPath(this->RegexUpdate.match(1)[0],
|
||||||
|
@ -323,14 +323,14 @@ private:
|
||||||
Change CurChange;
|
Change CurChange;
|
||||||
std::vector<char> CData;
|
std::vector<char> CData;
|
||||||
|
|
||||||
virtual bool ProcessChunk(const char* data, int length)
|
bool ProcessChunk(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->OutputLogger::ProcessChunk(data, length);
|
this->OutputLogger::ProcessChunk(data, length);
|
||||||
this->ParseChunk(data, length);
|
this->ParseChunk(data, length);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void StartElement(const std::string& name, const char** atts)
|
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CData.clear();
|
this->CData.clear();
|
||||||
if (name == "logentry") {
|
if (name == "logentry") {
|
||||||
|
@ -348,12 +348,12 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void CharacterDataHandler(const char* data, int length)
|
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CData.insert(this->CData.end(), data, data + length);
|
this->CData.insert(this->CData.end(), data, data + length);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EndElement(const std::string& name)
|
void EndElement(const std::string& name) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "logentry") {
|
if (name == "logentry") {
|
||||||
this->SVN->DoRevisionSVN(this->Rev, this->Changes);
|
this->SVN->DoRevisionSVN(this->Rev, this->Changes);
|
||||||
|
@ -372,7 +372,7 @@ private:
|
||||||
this->CData.clear();
|
this->CData.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ReportError(int, int, const char* msg)
|
void ReportError(int, int, const char* msg) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->SVN->Log << "Error parsing svn log xml: " << msg << "\n";
|
this->SVN->Log << "Error parsing svn log xml: " << msg << "\n";
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ public:
|
||||||
private:
|
private:
|
||||||
cmCTestSVN* SVN;
|
cmCTestSVN* SVN;
|
||||||
cmsys::RegularExpression RegexStatus;
|
cmsys::RegularExpression RegexStatus;
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexStatus.find(this->Line)) {
|
if (this->RegexStatus.find(this->Line)) {
|
||||||
this->DoPath(this->RegexStatus.match(1)[0],
|
this->DoPath(this->RegexStatus.match(1)[0],
|
||||||
|
@ -506,7 +506,7 @@ public:
|
||||||
private:
|
private:
|
||||||
cmCTestSVN* SVN;
|
cmCTestSVN* SVN;
|
||||||
cmsys::RegularExpression RegexExternal;
|
cmsys::RegularExpression RegexExternal;
|
||||||
bool ProcessLine()
|
bool ProcessLine() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (this->RegexExternal.find(this->Line)) {
|
if (this->RegexExternal.find(this->Line)) {
|
||||||
this->DoPath(this->RegexExternal.match(1));
|
this->DoPath(this->RegexExternal.match(1));
|
||||||
|
|
|
@ -60,8 +60,8 @@ class cmCTestScriptFunctionBlocker : public cmFunctionBlocker
|
||||||
public:
|
public:
|
||||||
cmCTestScriptFunctionBlocker() {}
|
cmCTestScriptFunctionBlocker() {}
|
||||||
virtual ~cmCTestScriptFunctionBlocker() {}
|
virtual ~cmCTestScriptFunctionBlocker() {}
|
||||||
virtual bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
|
bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
|
||||||
cmExecutionStatus&);
|
cmExecutionStatus&) CM_OVERRIDE;
|
||||||
// virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf);
|
// virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf);
|
||||||
// virtual void ScopeEnded(cmMakefile &mf);
|
// virtual void ScopeEnded(cmMakefile &mf);
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ private:
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void StartElement(const std::string& name, const char** atts)
|
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CurrentValue.clear();
|
this->CurrentValue.clear();
|
||||||
if (name == "cdash") {
|
if (name == "cdash") {
|
||||||
|
@ -77,12 +77,12 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void CharacterDataHandler(const char* data, int length)
|
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
this->CurrentValue.insert(this->CurrentValue.end(), data, data + length);
|
this->CurrentValue.insert(this->CurrentValue.end(), data, data + length);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EndElement(const std::string& name)
|
void EndElement(const std::string& name) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "status") {
|
if (name == "status") {
|
||||||
std::string status = cmSystemTools::UpperCase(this->GetCurrentValue());
|
std::string status = cmSystemTools::UpperCase(this->GetCurrentValue());
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* This is a virtual constructor for the command.
|
* This is a virtual constructor for the command.
|
||||||
*/
|
*/
|
||||||
virtual cmCommand* Clone()
|
cmCommand* Clone() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
cmCTestSubdirCommand* c = new cmCTestSubdirCommand;
|
cmCTestSubdirCommand* c = new cmCTestSubdirCommand;
|
||||||
c->TestHandler = this->TestHandler;
|
c->TestHandler = this->TestHandler;
|
||||||
|
@ -53,13 +53,13 @@ public:
|
||||||
* This is called when the command is first encountered in
|
* This is called when the command is first encountered in
|
||||||
* the CMakeLists.txt file.
|
* the CMakeLists.txt file.
|
||||||
*/
|
*/
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&);
|
cmExecutionStatus&) CM_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "subdirs"; }
|
std::string GetName() const CM_OVERRIDE { return "subdirs"; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestSubdirCommand, cmCommand);
|
cmTypeMacro(cmCTestSubdirCommand, cmCommand);
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* This is a virtual constructor for the command.
|
* This is a virtual constructor for the command.
|
||||||
*/
|
*/
|
||||||
virtual cmCommand* Clone()
|
cmCommand* Clone() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
cmCTestAddSubdirectoryCommand* c = new cmCTestAddSubdirectoryCommand;
|
cmCTestAddSubdirectoryCommand* c = new cmCTestAddSubdirectoryCommand;
|
||||||
c->TestHandler = this->TestHandler;
|
c->TestHandler = this->TestHandler;
|
||||||
|
@ -134,13 +134,13 @@ public:
|
||||||
* This is called when the command is first encountered in
|
* This is called when the command is first encountered in
|
||||||
* the CMakeLists.txt file.
|
* the CMakeLists.txt file.
|
||||||
*/
|
*/
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&);
|
cmExecutionStatus&) CM_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "add_subdirectory"; }
|
std::string GetName() const CM_OVERRIDE { return "add_subdirectory"; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand);
|
cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand);
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* This is a virtual constructor for the command.
|
* This is a virtual constructor for the command.
|
||||||
*/
|
*/
|
||||||
virtual cmCommand* Clone()
|
cmCommand* Clone() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
cmCTestAddTestCommand* c = new cmCTestAddTestCommand;
|
cmCTestAddTestCommand* c = new cmCTestAddTestCommand;
|
||||||
c->TestHandler = this->TestHandler;
|
c->TestHandler = this->TestHandler;
|
||||||
|
@ -208,13 +208,13 @@ public:
|
||||||
* This is called when the command is first encountered in
|
* This is called when the command is first encountered in
|
||||||
* the CMakeLists.txt file.
|
* the CMakeLists.txt file.
|
||||||
*/
|
*/
|
||||||
virtual bool InitialPass(std::vector<std::string> const&,
|
bool InitialPass(std::vector<std::string> const&,
|
||||||
cmExecutionStatus&);
|
cmExecutionStatus&) CM_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "add_test"; }
|
std::string GetName() const CM_OVERRIDE { return "add_test"; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestAddTestCommand, cmCommand);
|
cmTypeMacro(cmCTestAddTestCommand, cmCommand);
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* This is a virtual constructor for the command.
|
* This is a virtual constructor for the command.
|
||||||
*/
|
*/
|
||||||
virtual cmCommand* Clone()
|
cmCommand* Clone() CM_OVERRIDE
|
||||||
{
|
{
|
||||||
cmCTestSetTestsPropertiesCommand* c = new cmCTestSetTestsPropertiesCommand;
|
cmCTestSetTestsPropertiesCommand* c = new cmCTestSetTestsPropertiesCommand;
|
||||||
c->TestHandler = this->TestHandler;
|
c->TestHandler = this->TestHandler;
|
||||||
|
@ -248,13 +248,13 @@ public:
|
||||||
* This is called when the command is first encountered in
|
* This is called when the command is first encountered in
|
||||||
* the CMakeLists.txt file.
|
* the CMakeLists.txt file.
|
||||||
*/
|
*/
|
||||||
virtual bool InitialPass(std::vector<std::string> const&,
|
bool InitialPass(std::vector<std::string> const&,
|
||||||
cmExecutionStatus&);
|
cmExecutionStatus&) CM_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "set_tests_properties"; }
|
std::string GetName() const CM_OVERRIDE { return "set_tests_properties"; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand);
|
cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
virtual ~XMLParser() {}
|
virtual ~XMLParser() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void EndElement(const std::string& name)
|
void EndElement(const std::string& name) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "source") {
|
if (name == "source") {
|
||||||
this->InSource = false;
|
this->InSource = false;
|
||||||
|
@ -34,7 +34,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void CharacterDataHandler(const char* data, int length)
|
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
std::string tmp;
|
std::string tmp;
|
||||||
tmp.insert(0, data, length);
|
tmp.insert(0, data, length);
|
||||||
|
@ -46,7 +46,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void StartElement(const std::string& name, const char** atts)
|
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
std::string FoundSource;
|
std::string FoundSource;
|
||||||
std::string finalpath = "";
|
std::string finalpath = "";
|
||||||
|
|
|
@ -23,9 +23,9 @@ public:
|
||||||
virtual ~XMLParser() {}
|
virtual ~XMLParser() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void EndElement(const std::string&) {}
|
void EndElement(const std::string&) CM_OVERRIDE {}
|
||||||
|
|
||||||
virtual void StartElement(const std::string& name, const char** atts)
|
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (name == "package") {
|
if (name == "package") {
|
||||||
this->PackageName = atts[1];
|
this->PackageName = atts[1];
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
|
|
||||||
if(CMAKE_CXX_STANDARD AND NOT DEFINED CMake_HAVE_CXX11_UNORDERED_MAP)
|
|
||||||
message(STATUS "Checking if compiler supports C++11 unordered_map")
|
|
||||||
try_compile(CMake_HAVE_CXX11_UNORDERED_MAP
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/cm_cxx11_unordered_map.cpp
|
|
||||||
CMAKE_FLAGS -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
|
|
||||||
OUTPUT_VARIABLE OUTPUT
|
|
||||||
)
|
|
||||||
if(CMake_HAVE_CXX11_UNORDERED_MAP)
|
|
||||||
message(STATUS "Checking if compiler supports C++11 unordered_map - yes")
|
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
||||||
"Determining if compiler supports C++11 unordered_map passed with the following output:\n"
|
|
||||||
"${OUTPUT}\n"
|
|
||||||
"\n"
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
message(STATUS "Checking if compiler supports C++11 unordered_map - no")
|
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
||||||
"Determining if compiler supports C++11 unordered_map failed with the following output:\n"
|
|
||||||
"${OUTPUT}\n"
|
|
||||||
"\n"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
|
||||||
|
function(cm_check_cxx_feature name)
|
||||||
|
string(TOUPPER ${name} FEATURE)
|
||||||
|
if(NOT DEFINED CMake_HAVE_CXX_${FEATURE})
|
||||||
|
message(STATUS "Checking if compiler supports C++ ${name}")
|
||||||
|
try_compile(CMake_HAVE_CXX_${FEATURE}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/cm_cxx_${name}.cxx
|
||||||
|
CMAKE_FLAGS -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
|
||||||
|
OUTPUT_VARIABLE OUTPUT
|
||||||
|
)
|
||||||
|
# If using the feature causes warnings, treat it as broken/unavailable.
|
||||||
|
if(OUTPUT MATCHES "warning")
|
||||||
|
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
|
||||||
|
endif()
|
||||||
|
if(CMake_HAVE_CXX_${FEATURE})
|
||||||
|
message(STATUS "Checking if compiler supports C++ ${name} - yes")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
|
"Determining if compiler supports C++ ${name} passed with the following output:\n"
|
||||||
|
"${OUTPUT}\n"
|
||||||
|
"\n"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message(STATUS "Checking if compiler supports C++ ${name} - no")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Determining if compiler supports C++ ${name} failed with the following output:\n"
|
||||||
|
"${OUTPUT}\n"
|
||||||
|
"\n"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_STANDARD)
|
||||||
|
cm_check_cxx_feature(override)
|
||||||
|
cm_check_cxx_feature(unordered_map)
|
||||||
|
cm_check_cxx_feature(unordered_set)
|
||||||
|
endif()
|
|
@ -0,0 +1,20 @@
|
||||||
|
struct Foo
|
||||||
|
{
|
||||||
|
virtual int test() const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Bar : Foo
|
||||||
|
{
|
||||||
|
int test() const override { return 0; }
|
||||||
|
};
|
||||||
|
|
||||||
|
int test(Foo const& foo)
|
||||||
|
{
|
||||||
|
return foo.test();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Bar const bar;
|
||||||
|
return test(bar);
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
#include <unordered_set>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
std::unordered_set<int> set;
|
||||||
|
set.insert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -29,8 +29,16 @@
|
||||||
#cmakedefine CMAKE_USE_ELF_PARSER
|
#cmakedefine CMAKE_USE_ELF_PARSER
|
||||||
#cmakedefine CMAKE_USE_MACH_PARSER
|
#cmakedefine CMAKE_USE_MACH_PARSER
|
||||||
#cmakedefine CMAKE_ENCODING_UTF8
|
#cmakedefine CMAKE_ENCODING_UTF8
|
||||||
#cmakedefine CMake_HAVE_CXX11_UNORDERED_MAP
|
#cmakedefine CMake_HAVE_CXX_OVERRIDE
|
||||||
|
#cmakedefine CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
|
#cmakedefine CMake_HAVE_CXX_UNORDERED_SET
|
||||||
#define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
|
#define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
|
||||||
#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"
|
#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"
|
||||||
|
|
||||||
|
#ifdef CMake_HAVE_CXX_OVERRIDE
|
||||||
|
#define CM_OVERRIDE override
|
||||||
|
#else
|
||||||
|
#define CM_OVERRIDE
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "cmLinkedTree.h"
|
#include "cmLinkedTree.h"
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
#include "cmsys/hash_map.hxx"
|
#include "cmsys/hash_map.hxx"
|
||||||
|
@ -92,7 +92,7 @@ private:
|
||||||
static Def NoDef;
|
static Def NoDef;
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
typedef std::unordered_map<std::string, Def> MapType;
|
typedef std::unordered_map<std::string, Def> MapType;
|
||||||
#else
|
#else
|
||||||
typedef cmsys::hash_map<std::string, Def> MapType;
|
typedef cmsys::hash_map<std::string, Def> MapType;
|
||||||
|
|
|
@ -241,20 +241,20 @@ public:
|
||||||
ByteOrderType order);
|
ByteOrderType order);
|
||||||
|
|
||||||
// Return the number of sections as specified by the ELF header.
|
// Return the number of sections as specified by the ELF header.
|
||||||
virtual unsigned int GetNumberOfSections() const
|
unsigned int GetNumberOfSections() const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return static_cast<unsigned int>(this->ELFHeader.e_shnum);
|
return static_cast<unsigned int>(this->ELFHeader.e_shnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the file position and size of a dynamic section entry.
|
// Get the file position and size of a dynamic section entry.
|
||||||
virtual unsigned int GetDynamicEntryCount();
|
unsigned int GetDynamicEntryCount() CM_OVERRIDE;
|
||||||
virtual unsigned long GetDynamicEntryPosition(int j);
|
unsigned long GetDynamicEntryPosition(int j) CM_OVERRIDE;
|
||||||
|
|
||||||
// Lookup a string from the dynamic section with the given tag.
|
// Lookup a string from the dynamic section with the given tag.
|
||||||
virtual StringEntry const* GetDynamicSectionString(unsigned int tag);
|
StringEntry const* GetDynamicSectionString(unsigned int tag) CM_OVERRIDE;
|
||||||
|
|
||||||
// Print information about the ELF file.
|
// Print information about the ELF file.
|
||||||
virtual void PrintInfo(std::ostream& os) const
|
void PrintInfo(std::ostream& os) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
os << "ELF " << Types::GetName();
|
os << "ELF " << Types::GetName();
|
||||||
if (this->ByteOrder == ByteOrderMSB) {
|
if (this->ByteOrder == ByteOrderMSB) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
// Use a hash table to avoid duplicate file time checks from disk.
|
// Use a hash table to avoid duplicate file time checks from disk.
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
#include <cmsys/hash_map.hxx>
|
#include <cmsys/hash_map.hxx>
|
||||||
|
@ -47,13 +47,13 @@ private:
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
size_t operator()(const std::string& s) const { return h(s.c_str()); }
|
size_t operator()(const std::string& s) const { return h(s.c_str()); }
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
std::hash<const char*> h;
|
std::hash<const char*> h;
|
||||||
#else
|
#else
|
||||||
cmsys::hash<const char*> h;
|
cmsys::hash<const char*> h;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
typedef std::unordered_map<std::string,
|
typedef std::unordered_map<std::string,
|
||||||
#else
|
#else
|
||||||
typedef cmsys::hash_map<std::string,
|
typedef cmsys::hash_map<std::string,
|
||||||
|
|
|
@ -42,14 +42,14 @@ static const struct ZeroNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
ZeroNode() {}
|
ZeroNode() {}
|
||||||
|
|
||||||
virtual bool GeneratesContent() const { return false; }
|
bool GeneratesContent() const CM_OVERRIDE { return false; }
|
||||||
|
|
||||||
virtual bool AcceptsArbitraryContentParameter() const { return true; }
|
bool AcceptsArbitraryContentParameter() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>&,
|
std::string Evaluate(const std::vector<std::string>&,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
@ -59,12 +59,12 @@ static const struct OneNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
OneNode() {}
|
OneNode() {}
|
||||||
|
|
||||||
virtual bool AcceptsArbitraryContentParameter() const { return true; }
|
bool AcceptsArbitraryContentParameter() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return parameters.front();
|
return parameters.front();
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ static const struct NotNode : public cmGeneratorExpressionNode
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (*parameters.begin() != "0" && *parameters.begin() != "1") {
|
if (*parameters.begin() != "0" && *parameters.begin() != "1") {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -129,12 +129,12 @@ static const struct BoolNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
BoolNode() {}
|
BoolNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 1; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 1; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return !cmSystemTools::IsOff(parameters.begin()->c_str()) ? "1" : "0";
|
return !cmSystemTools::IsOff(parameters.begin()->c_str()) ? "1" : "0";
|
||||||
}
|
}
|
||||||
|
@ -144,12 +144,12 @@ static const struct StrEqualNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
StrEqualNode() {}
|
StrEqualNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 2; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 2; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return *parameters.begin() == parameters[1] ? "1" : "0";
|
return *parameters.begin() == parameters[1] ? "1" : "0";
|
||||||
}
|
}
|
||||||
|
@ -159,12 +159,12 @@ static const struct EqualNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
EqualNode() {}
|
EqualNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 2; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 2; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
char* pEnd;
|
char* pEnd;
|
||||||
|
|
||||||
|
@ -236,12 +236,12 @@ static const struct LowerCaseNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
LowerCaseNode() {}
|
LowerCaseNode() {}
|
||||||
|
|
||||||
bool AcceptsArbitraryContentParameter() const { return true; }
|
bool AcceptsArbitraryContentParameter() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return cmSystemTools::LowerCase(parameters.front());
|
return cmSystemTools::LowerCase(parameters.front());
|
||||||
}
|
}
|
||||||
|
@ -251,12 +251,12 @@ static const struct UpperCaseNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
UpperCaseNode() {}
|
UpperCaseNode() {}
|
||||||
|
|
||||||
bool AcceptsArbitraryContentParameter() const { return true; }
|
bool AcceptsArbitraryContentParameter() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return cmSystemTools::UpperCase(parameters.front());
|
return cmSystemTools::UpperCase(parameters.front());
|
||||||
}
|
}
|
||||||
|
@ -266,12 +266,12 @@ static const struct MakeCIdentifierNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
MakeCIdentifierNode() {}
|
MakeCIdentifierNode() {}
|
||||||
|
|
||||||
bool AcceptsArbitraryContentParameter() const { return true; }
|
bool AcceptsArbitraryContentParameter() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return cmSystemTools::MakeCidentifier(parameters.front());
|
return cmSystemTools::MakeCidentifier(parameters.front());
|
||||||
}
|
}
|
||||||
|
@ -281,12 +281,12 @@ static const struct Angle_RNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
Angle_RNode() {}
|
Angle_RNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 0; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 0; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>&,
|
std::string Evaluate(const std::vector<std::string>&,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return ">";
|
return ">";
|
||||||
}
|
}
|
||||||
|
@ -296,12 +296,12 @@ static const struct CommaNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
CommaNode() {}
|
CommaNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 0; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 0; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>&,
|
std::string Evaluate(const std::vector<std::string>&,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return ",";
|
return ",";
|
||||||
}
|
}
|
||||||
|
@ -311,12 +311,12 @@ static const struct SemicolonNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
SemicolonNode() {}
|
SemicolonNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 0; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 0; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>&,
|
std::string Evaluate(const std::vector<std::string>&,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return ";";
|
return ";";
|
||||||
}
|
}
|
||||||
|
@ -326,7 +326,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
CompilerIdNode() {}
|
CompilerIdNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return OneOrZeroParameters; }
|
int NumExpectedParameters() const CM_OVERRIDE { return OneOrZeroParameters; }
|
||||||
|
|
||||||
std::string EvaluateWithLanguage(const std::vector<std::string>& parameters,
|
std::string EvaluateWithLanguage(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
|
@ -381,6 +381,7 @@ static const struct CCompilerIdNode : public CompilerIdNode
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!context->HeadTarget) {
|
if (!context->HeadTarget) {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -402,6 +403,7 @@ static const struct CXXCompilerIdNode : public CompilerIdNode
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!context->HeadTarget) {
|
if (!context->HeadTarget) {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -419,7 +421,7 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
CompilerVersionNode() {}
|
CompilerVersionNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return OneOrZeroParameters; }
|
int NumExpectedParameters() const CM_OVERRIDE { return OneOrZeroParameters; }
|
||||||
|
|
||||||
std::string EvaluateWithLanguage(const std::vector<std::string>& parameters,
|
std::string EvaluateWithLanguage(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
|
@ -460,6 +462,7 @@ static const struct CCompilerVersionNode : public CompilerVersionNode
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!context->HeadTarget) {
|
if (!context->HeadTarget) {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -481,6 +484,7 @@ static const struct CxxCompilerVersionNode : public CompilerVersionNode
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!context->HeadTarget) {
|
if (!context->HeadTarget) {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -498,12 +502,12 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
PlatformIdNode() {}
|
PlatformIdNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return OneOrZeroParameters; }
|
int NumExpectedParameters() const CM_OVERRIDE { return OneOrZeroParameters; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
const char* platformId =
|
const char* platformId =
|
||||||
context->LG->GetMakefile()->GetSafeDefinition("CMAKE_SYSTEM_NAME");
|
context->LG->GetMakefile()->GetSafeDefinition("CMAKE_SYSTEM_NAME");
|
||||||
|
@ -526,12 +530,12 @@ static const struct VersionGreaterNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
VersionGreaterNode() {}
|
VersionGreaterNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 2; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 2; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER,
|
return cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER,
|
||||||
parameters.front().c_str(),
|
parameters.front().c_str(),
|
||||||
|
@ -545,12 +549,12 @@ static const struct VersionLessNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
VersionLessNode() {}
|
VersionLessNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 2; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 2; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
|
return cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
|
||||||
parameters.front().c_str(),
|
parameters.front().c_str(),
|
||||||
|
@ -564,12 +568,12 @@ static const struct VersionEqualNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
VersionEqualNode() {}
|
VersionEqualNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 2; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 2; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL,
|
return cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL,
|
||||||
parameters.front().c_str(),
|
parameters.front().c_str(),
|
||||||
|
@ -583,10 +587,10 @@ static const struct LinkOnlyNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
LinkOnlyNode() {}
|
LinkOnlyNode() {}
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(
|
||||||
cmGeneratorExpressionContext*,
|
const std::vector<std::string>& parameters, cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!dagChecker->GetTransitivePropertiesOnly()) {
|
if (!dagChecker->GetTransitivePropertiesOnly()) {
|
||||||
return parameters.front();
|
return parameters.front();
|
||||||
|
@ -599,12 +603,12 @@ static const struct ConfigurationNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
ConfigurationNode() {}
|
ConfigurationNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 0; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 0; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>&,
|
std::string Evaluate(const std::vector<std::string>&,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
context->HadContextSensitiveCondition = true;
|
context->HadContextSensitiveCondition = true;
|
||||||
return context->Config;
|
return context->Config;
|
||||||
|
@ -615,12 +619,12 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
ConfigurationTestNode() {}
|
ConfigurationTestNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return OneOrZeroParameters; }
|
int NumExpectedParameters() const CM_OVERRIDE { return OneOrZeroParameters; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (parameters.empty()) {
|
if (parameters.empty()) {
|
||||||
return configurationNode.Evaluate(parameters, context, content, 0);
|
return configurationNode.Evaluate(parameters, context, content, 0);
|
||||||
|
@ -673,14 +677,14 @@ static const struct JoinNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
JoinNode() {}
|
JoinNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 2; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 2; }
|
||||||
|
|
||||||
virtual bool AcceptsArbitraryContentParameter() const { return true; }
|
bool AcceptsArbitraryContentParameter() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
std::vector<std::string> list;
|
std::vector<std::string> list;
|
||||||
cmSystemTools::ExpandListArgument(parameters.front(), list);
|
cmSystemTools::ExpandListArgument(parameters.front(), list);
|
||||||
|
@ -692,12 +696,13 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
CompileLanguageNode() {}
|
CompileLanguageNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return OneOrZeroParameters; }
|
int NumExpectedParameters() const CM_OVERRIDE { return OneOrZeroParameters; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (context->Language.empty()) {
|
if (context->Language.empty()) {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -795,12 +800,13 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||||
TargetPropertyNode() {}
|
TargetPropertyNode() {}
|
||||||
|
|
||||||
// This node handles errors on parameter count itself.
|
// This node handles errors on parameter count itself.
|
||||||
virtual int NumExpectedParameters() const { return OneOrMoreParameters; }
|
int NumExpectedParameters() const CM_OVERRIDE { return OneOrMoreParameters; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagCheckerParent) const
|
cmGeneratorExpressionDAGChecker* dagCheckerParent) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (parameters.size() != 1 && parameters.size() != 2) {
|
if (parameters.size() != 1 && parameters.size() != 2) {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -1087,20 +1093,20 @@ static const struct TargetNameNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
TargetNameNode() {}
|
TargetNameNode() {}
|
||||||
|
|
||||||
virtual bool GeneratesContent() const { return true; }
|
bool GeneratesContent() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
virtual bool AcceptsArbitraryContentParameter() const { return true; }
|
bool AcceptsArbitraryContentParameter() const CM_OVERRIDE { return true; }
|
||||||
virtual bool RequiresLiteralInput() const { return true; }
|
bool RequiresLiteralInput() const CM_OVERRIDE { return true; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext*,
|
cmGeneratorExpressionContext*,
|
||||||
const GeneratorExpressionContent*,
|
const GeneratorExpressionContent*,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
return parameters.front();
|
return parameters.front();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 1; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 1; }
|
||||||
|
|
||||||
} targetNameNode;
|
} targetNameNode;
|
||||||
|
|
||||||
|
@ -1111,7 +1117,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!context->EvaluateForBuildsystem) {
|
if (!context->EvaluateForBuildsystem) {
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
|
@ -1179,12 +1185,13 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
CompileFeaturesNode() {}
|
CompileFeaturesNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return OneOrMoreParameters; }
|
int NumExpectedParameters() const CM_OVERRIDE { return OneOrMoreParameters; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
cmGeneratorTarget const* target = context->HeadTarget;
|
cmGeneratorTarget const* target = context->HeadTarget;
|
||||||
if (!target) {
|
if (!target) {
|
||||||
|
@ -1306,12 +1313,12 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
TargetPolicyNode() {}
|
TargetPolicyNode() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 1; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 1; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!context->HeadTarget) {
|
if (!context->HeadTarget) {
|
||||||
reportError(
|
reportError(
|
||||||
|
@ -1365,13 +1372,13 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
InstallPrefixNode() {}
|
InstallPrefixNode() {}
|
||||||
|
|
||||||
virtual bool GeneratesContent() const { return true; }
|
bool GeneratesContent() const CM_OVERRIDE { return true; }
|
||||||
virtual int NumExpectedParameters() const { return 0; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 0; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>&,
|
std::string Evaluate(const std::vector<std::string>&,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
reportError(context, content->GetOriginalExpression(),
|
reportError(context, content->GetOriginalExpression(),
|
||||||
"INSTALL_PREFIX is a marker for install(EXPORT) only. It "
|
"INSTALL_PREFIX is a marker for install(EXPORT) only. It "
|
||||||
|
@ -1529,12 +1536,13 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
TargetFilesystemArtifact() {}
|
TargetFilesystemArtifact() {}
|
||||||
|
|
||||||
virtual int NumExpectedParameters() const { return 1; }
|
int NumExpectedParameters() const CM_OVERRIDE { return 1; }
|
||||||
|
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||||
|
CM_OVERRIDE
|
||||||
{
|
{
|
||||||
// Lookup the referenced target.
|
// Lookup the referenced target.
|
||||||
std::string name = *parameters.begin();
|
std::string name = *parameters.begin();
|
||||||
|
@ -1606,7 +1614,7 @@ static const struct ShellPathNode : public cmGeneratorExpressionNode
|
||||||
std::string Evaluate(const std::vector<std::string>& parameters,
|
std::string Evaluate(const std::vector<std::string>& parameters,
|
||||||
cmGeneratorExpressionContext* context,
|
cmGeneratorExpressionContext* context,
|
||||||
const GeneratorExpressionContent* content,
|
const GeneratorExpressionContent* content,
|
||||||
cmGeneratorExpressionDAGChecker*) const
|
cmGeneratorExpressionDAGChecker*) const CM_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!cmSystemTools::FileIsFullPath(parameters.front())) {
|
if (!cmSystemTools::FileIsFullPath(parameters.front())) {
|
||||||
reportError(context, content->GetOriginalExpression(),
|
reportError(context, content->GetOriginalExpression(),
|
||||||
|
|
|
@ -27,7 +27,10 @@
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMake_HAVE_CXX_UNORDERED_SET)
|
||||||
|
#include <unordered_set>
|
||||||
|
#define UNORDERED_SET std::unordered_set
|
||||||
|
#elif defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#include <cmsys/hash_set.hxx>
|
#include <cmsys/hash_set.hxx>
|
||||||
#define UNORDERED_SET cmsys::hash_set
|
#define UNORDERED_SET cmsys::hash_set
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#include "cmFileLockPool.h"
|
#include "cmFileLockPool.h"
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
#include <cmsys/hash_map.hxx>
|
#include <cmsys/hash_map.hxx>
|
||||||
|
@ -433,7 +433,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
typedef std::unordered_map<std::string, cmTarget*> TargetMap;
|
typedef std::unordered_map<std::string, cmTarget*> TargetMap;
|
||||||
typedef std::unordered_map<std::string, cmGeneratorTarget*>
|
typedef std::unordered_map<std::string, cmGeneratorTarget*>
|
||||||
GeneratorTargetMap;
|
GeneratorTargetMap;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <cmsys/RegularExpression.hxx>
|
#include <cmsys/RegularExpression.hxx>
|
||||||
#include <cmsys/auto_ptr.hxx>
|
#include <cmsys/auto_ptr.hxx>
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
#include <cmsys/hash_map.hxx>
|
#include <cmsys/hash_map.hxx>
|
||||||
|
@ -796,7 +796,7 @@ protected:
|
||||||
// libraries, classes, and executables
|
// libraries, classes, and executables
|
||||||
mutable cmTargets Targets;
|
mutable cmTargets Targets;
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
typedef std::unordered_map<std::string, cmTarget*> TargetMap;
|
typedef std::unordered_map<std::string, cmTarget*> TargetMap;
|
||||||
#else
|
#else
|
||||||
typedef cmsys::hash_map<std::string, cmTarget*> TargetMap;
|
typedef cmsys::hash_map<std::string, cmTarget*> TargetMap;
|
||||||
|
@ -915,7 +915,7 @@ private:
|
||||||
|
|
||||||
// A map for fast output to input look up.
|
// A map for fast output to input look up.
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
typedef std::unordered_map<std::string, cmSourceFile*> OutputToSourceMap;
|
typedef std::unordered_map<std::string, cmSourceFile*> OutputToSourceMap;
|
||||||
#else
|
#else
|
||||||
typedef cmsys::hash_map<std::string, cmSourceFile*> OutputToSourceMap;
|
typedef cmsys::hash_map<std::string, cmSourceFile*> OutputToSourceMap;
|
||||||
|
|
|
@ -157,7 +157,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Report(std::ostream& e)
|
void Report(std::ostream& e) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
e << "runtime library [";
|
e << "runtime library [";
|
||||||
if (this->SOName.empty()) {
|
if (this->SOName.empty()) {
|
||||||
|
@ -168,7 +168,7 @@ public:
|
||||||
e << "]";
|
e << "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool FindConflict(std::string const& dir);
|
bool FindConflict(std::string const& dir) CM_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The soname of the shared library if it is known.
|
// The soname of the shared library if it is known.
|
||||||
|
@ -212,12 +212,12 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Report(std::ostream& e)
|
void Report(std::ostream& e) CM_OVERRIDE
|
||||||
{
|
{
|
||||||
e << "link library [" << this->FileName << "]";
|
e << "link library [" << this->FileName << "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool FindConflict(std::string const& dir);
|
bool FindConflict(std::string const& dir) CM_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool cmOrderDirectoriesConstraintLibrary::FindConflict(std::string const& dir)
|
bool cmOrderDirectoriesConstraintLibrary::FindConflict(std::string const& dir)
|
||||||
|
|
|
@ -27,7 +27,11 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <stdlib.h> // required for atof
|
#include <stdlib.h> // required for atof
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
|
||||||
|
#if defined(CMake_HAVE_CXX_UNORDERED_SET)
|
||||||
|
#include <unordered_set>
|
||||||
|
#define UNORDERED_SET std::unordered_set
|
||||||
|
#elif defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#include <cmsys/hash_set.hxx>
|
#include <cmsys/hash_set.hxx>
|
||||||
#define UNORDERED_SET cmsys::hash_set
|
#define UNORDERED_SET cmsys::hash_set
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <cmsys/auto_ptr.hxx>
|
#include <cmsys/auto_ptr.hxx>
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
#include <cmsys/hash_map.hxx>
|
#include <cmsys/hash_map.hxx>
|
||||||
|
@ -331,7 +331,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||||
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
|
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
|
||||||
typedef std::unordered_map<std::string, cmTarget> cmTargets;
|
typedef std::unordered_map<std::string, cmTarget> cmTargets;
|
||||||
#else
|
#else
|
||||||
typedef cmsys::hash_map<std::string, cmTarget> cmTargets;
|
typedef cmsys::hash_map<std::string, cmTarget> cmTargets;
|
||||||
|
|
|
@ -1272,6 +1272,7 @@ cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_BINARY_DIR \"${CMAKE_
|
||||||
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BIN_DIR \"/bootstrap-not-insalled\""
|
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BIN_DIR \"/bootstrap-not-insalled\""
|
||||||
cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\""
|
cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\""
|
||||||
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"
|
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"
|
||||||
|
cmake_report cmConfigure.h${_tmp} "#define CM_OVERRIDE"
|
||||||
|
|
||||||
# Regenerate configured headers
|
# Regenerate configured headers
|
||||||
for h in Configure VersionConfig; do
|
for h in Configure VersionConfig; do
|
||||||
|
|
Loading…
Reference in New Issue