diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-07-26 15:46:22 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-07-26 15:46:22 (GMT) |
commit | a9c0929d3938e432484cc2c3e44bf79167ed010d (patch) | |
tree | e9b9ebe3403518d16eb3cee89f32801828341e55 /Source | |
parent | 47ef50453004e62510f5705185d912950e8fb68f (diff) | |
download | CMake-a9c0929d3938e432484cc2c3e44bf79167ed010d.zip CMake-a9c0929d3938e432484cc2c3e44bf79167ed010d.tar.gz CMake-a9c0929d3938e432484cc2c3e44bf79167ed010d.tar.bz2 |
COMP: Handle both ansi and non-ansi C
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 1 | ||||
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 2 | ||||
-rw-r--r-- | Source/cmIncludeDirectoryCommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 2 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 2 |
5 files changed, 12 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 6a37ba9..a8c2861 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -684,6 +684,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, << std::endl; cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to find executable: " << args[1].c_str() << std::endl); + cres.Output = "Unable to find executable: " + args[1]; if ( !this->CTest->GetShowOnly() ) { cres.FullCommandLine = actualCommand; diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 51a4d3a..1d37a34 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -139,7 +139,7 @@ void cmCommandArgumentParserHelper::AllocateParserType pt->str = 0; if ( len == 0 ) { - len = (int)strlen(str); + len = static_cast<int>(strlen(str)); } if ( len == 0 ) { diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index b493eb3..39492a6 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -56,6 +56,14 @@ bool cmIncludeDirectoryCommand tmp += unixPath; unixPath = tmp; } + /* + if ( !cmSystemTools::FileExists(unixPath.c_str()) ) + { + std::string out = "Cannot find directory: " + unixPath; + this->SetError(out.c_str()); + return false; + } + */ this->Makefile->AddIncludeDirectory(unixPath.c_str(), before); } return true; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 49bf647..871a81b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -905,7 +905,7 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target, { cmOStringStream e; e << "Attempt to add link target " << lib << " of type: " - << cmTarget::TargetTypeNames[(int)tgt->GetType()] + << cmTarget::TargetTypeNames[static_cast<int>(tgt->GetType())] << "\nto target " << target << ". You can only link to STATIC or SHARED libraries."; // in older versions of cmake linking to modules was allowed diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index bc9af6a..4d257b2 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1338,7 +1338,7 @@ std::string cmSystemTools::MakeXMLSafe(const char* str) && ch != '\r' ) { char buffer[33]; - sprintf(buffer, "<%d>", (int)ch); + sprintf(buffer, "<%d>", static_cast<int>(ch)); //sprintf(buffer, "&#x%0x;", (unsigned int)ch); result.insert(result.end(), buffer, buffer+strlen(buffer)); } |