summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-01-29 20:23:18 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-01-29 20:23:18 (GMT)
commitd74b75af09626502d898991151ce1b152ac2e0ef (patch)
treec66e8928dd2ab81778c7d1bf73b8ea49e27213ae
parent75fb6798ab3676b8aeadd15d54e065b553286559 (diff)
downloadCMake-d74b75af09626502d898991151ce1b152ac2e0ef.zip
CMake-d74b75af09626502d898991151ce1b152ac2e0ef.tar.gz
CMake-d74b75af09626502d898991151ce1b152ac2e0ef.tar.bz2
ENH: Emit a little more information in the error message when the output file is not found during a core try compile.
-rw-r--r--Source/cmCoreTryCompile.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index e756c1c..0ebe2cd 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -22,7 +22,6 @@
int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
{
-
this->BinaryDirectory = argv[1].c_str();
this->OutputFile = "";
// which signature were we called with ?
@@ -305,6 +304,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
if (this->SrcFileSignature)
{
this->FindOutputFile(targetName);
+
if ((res==0) && (copyFile.size()))
{
if(!cmSystemTools::CopyFileAlways(this->OutputFile.c_str(),
@@ -314,6 +314,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
emsg << "Could not COPY_FILE.\n"
<< " OutputFile: '" << this->OutputFile.c_str() << "'\n"
<< " copyFile: '" << copyFile.c_str() << "'\n";
+
+ if (this->FindErrorMessage.size())
+ {
+ emsg << "\n";
+ emsg << this->FindErrorMessage.c_str() << "\n";
+ }
+
cmSystemTools::Error(emsg.str().c_str());
return -1;
}