summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-04-12 02:39:34 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-04-12 02:39:34 (GMT)
commit852135074ed1ee273e4190a116564295aa8a3f15 (patch)
tree338ee89cecfa88adb782b0e8eb7d1f8772d90160 /Source/cmake.cxx
parentfa415043d808cbfc77c9a1d1963e0a8b30aae228 (diff)
downloadCMake-852135074ed1ee273e4190a116564295aa8a3f15.zip
CMake-852135074ed1ee273e4190a116564295aa8a3f15.tar.gz
CMake-852135074ed1ee273e4190a116564295aa8a3f15.tar.bz2
ENH: add more verbose output in verbose mode
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx46
1 files changed, 40 insertions, 6 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 341f210..0948959 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1844,6 +1844,11 @@ void cmake::UpdateConversionPathTable()
//----------------------------------------------------------------------------
int cmake::CheckBuildSystem()
{
+ // We do not need to rerun CMake. Check dependency integrity. Use
+ // the make system's VERBOSE environment variable to enable verbose
+ // output.
+ bool verbose = cmSystemTools::GetEnv("VERBOSE") != 0;
+
// This method will check the integrity of the build system if the
// option was given on the command line. It reads the given file to
// determine whether CMake should rerun. If it does rerun then the
@@ -1852,13 +1857,26 @@ int cmake::CheckBuildSystem()
// If no file is provided for the check, we have to rerun.
if(this->CheckBuildSystemArgument.size() == 0)
- {
+ {
+ if(verbose)
+ {
+ cmOStringStream msg;
+ msg << "Re-run cmake no build system arguments\n";
+ cmSystemTools::Stdout(msg.str().c_str());
+ }
return 1;
}
// If the file provided does not exist, we have to rerun.
if(!cmSystemTools::FileExists(this->CheckBuildSystemArgument.c_str()))
{
+ if(verbose)
+ {
+ cmOStringStream msg;
+ msg << "Re-run cmake missing file: "
+ << this->CheckBuildSystemArgument.c_str() << "\n";
+ cmSystemTools::Stdout(msg.str().c_str());
+ }
return 1;
}
@@ -1873,6 +1891,13 @@ int cmake::CheckBuildSystem()
if(!mf->ReadListFile(0, this->CheckBuildSystemArgument.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
{
+ if(verbose)
+ {
+ cmOStringStream msg;
+ msg << "Re-run cmake error reading : "
+ << this->CheckBuildSystemArgument.c_str() << "\n";
+ cmSystemTools::Stdout(msg.str().c_str());
+ }
// There was an error reading the file. Just rerun.
return 1;
}
@@ -1883,6 +1908,13 @@ int cmake::CheckBuildSystem()
if(!dependsStr || !outputsStr)
{
// Not enough information was provided to do the test. Just rerun.
+ if(verbose)
+ {
+ cmOStringStream msg;
+ msg << "Re-run cmake no CMAKE_MAKEFILE_DEPENDS "
+ "or CMAKE_MAKEFILE_OUTPUTS :\n";
+ cmSystemTools::Stdout(msg.str().c_str());
+ }
return 1;
}
std::vector<std::string> depends;
@@ -1902,16 +1934,18 @@ int cmake::CheckBuildSystem()
dep->c_str(), &result) ||
result < 0)
{
+ if(verbose)
+ {
+ cmOStringStream msg;
+ msg << "Re-run cmake file: " << out->c_str()
+ << " older than: " << dep->c_str() << "\n";
+ cmSystemTools::Stdout(msg.str().c_str());
+ }
return 1;
}
}
}
- // We do not need to rerun CMake. Check dependency integrity. Use
- // the make system's VERBOSE environment variable to enable verbose
- // output.
- bool verbose = cmSystemTools::GetEnv("VERBOSE") != 0;
-
// compute depends based on the generator specified
const char* genName = mf->GetDefinition("CMAKE_DEPENDS_GENERATOR");
if (!genName || genName[0] == '\0')