[cmake-commits] martink committed cmake.cxx 1.284 1.285
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Mar 1 10:53:11 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv5641
Modified Files:
cmake.cxx
Log Message:
BUG: a couple bugs in system informaiton
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -d -r1.284 -r1.285
--- cmake.cxx 28 Feb 2007 17:25:19 -0000 1.284
+++ cmake.cxx 1 Mar 2007 15:53:09 -0000 1.285
@@ -2928,6 +2928,7 @@
}
// process the arguments
+ bool writeToStdout = true;
for(unsigned int i=1; i < args.size(); ++i)
{
std::string arg = args[i];
@@ -2965,10 +2966,11 @@
{
if (!cmSystemTools::FileIsFullPath(arg.c_str()))
{
- resultFile += cwd;
+ resultFile = cwd;
resultFile += "/";
}
- resultFile = arg;
+ resultFile += arg;
+ writeToStdout = false;
}
}
@@ -3000,14 +3002,13 @@
// now run cmake on the CMakeLists file
cmSystemTools::ChangeDirectory(destPath.c_str());
- cmake cm;
std::vector<std::string> args2;
args2.push_back(args[0]);
args2.push_back(destPath);
std::string resultArg = "-DRESULT_FILE=";
resultArg += resultFile;
args2.push_back(resultArg);
- int res = cm.Run(args2, false);
+ int res = this->Run(args2, false);
if (res != 0)
{
@@ -3019,7 +3020,7 @@
cmSystemTools::ChangeDirectory(cwd.c_str());
// echo results to stdout if needed
- if (args.size() == 1)
+ if (writeToStdout)
{
FILE* fin = fopen(resultFile.c_str(), "r");
if(fin)
More information about the Cmake-commits
mailing list