diff options
author | Alexander Neundorf <neundorf@kde.org> | 2009-12-23 18:51:46 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2009-12-23 18:51:46 (GMT) |
commit | a1614caf37e907183fe831b6b7ecb96cdb21bfbe (patch) | |
tree | cedf7cf2ad8efab9b4112d7fb0b48d1f48f7c6fd /Source | |
parent | 8d88de4b4ab3bb5b42492cebd827fab124f2f048 (diff) | |
download | CMake-a1614caf37e907183fe831b6b7ecb96cdb21bfbe.zip CMake-a1614caf37e907183fe831b6b7ecb96cdb21bfbe.tar.gz CMake-a1614caf37e907183fe831b6b7ecb96cdb21bfbe.tar.bz2 |
disable cmake's verbose output in the Eclipse and KDevelop generators
The Eclipse and KDevelop generators set the VERBOSE environment variable to
TRUE in the project files, because they must be able to "see" the full
command lines and errors, otherwise they can't parse the errors. But the
VERBOSE env.var. also enables cmakes own verbose output, which can be quite
long. This commit introduces an environment variable CMAKE_NO_VERBOSE, which
when set disables cmake's verbose output also when VERBOSE is set. This
env.var is now set by both the Eclipse and the KDevelop generators.
Alex
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 9 | ||||
-rw-r--r-- | Source/cmGlobalKdevelopGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmake.cxx | 14 |
3 files changed, 14 insertions, 10 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 8703853..244f8ca 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -214,23 +214,22 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() fout << "\t\t\t\t<dictionary>\n" "\t\t\t\t\t<key>org.eclipse.cdt.make.core.environment</key>\n" - "\t\t\t\t\t<value>VERBOSE=1|</value>\n" // enforce VERBOSE Makefile output - "\t\t\t\t\t<value>" + "\t\t\t\t\t<value>VERBOSE=1|CMAKE_NO_VERBOSE=1|" // enforce VERBOSE Makefile output ; // set vsvars32.bat environment available at CMake time, // but not necessarily when eclipse is open if (make.find("nmake") != std::string::npos) { if (getenv("PATH")) - { + { fout << "PATH=" << getenv("PATH") << "|"; - } + } if (getenv("INCLUDE")) { fout << "INCLUDE=" << getenv("INCLUDE") << "|"; } if (getenv("LIB")) - { + { fout << "LIB=" << getenv("LIB") << "|"; } if (getenv("LIBPATH")) diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 6ceec48..56b9e9c 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -475,6 +475,7 @@ void cmGlobalKdevelopGenerator " <environments>\n" " <default>\n" " <envvar value=\"1\" name=\"VERBOSE\" />\n" + " <envvar value=\"1\" name=\"CMAKE_NO_VERBOSE\" />\n" " </default>\n" " </environments>\n" " </make>\n"; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a01e0e0..6a50ccc 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1418,8 +1418,10 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args) else if (args[1] == "cmake_depends" && args.size() >= 6) { // Use the make system's VERBOSE environment variable to enable - // verbose output. - bool verbose = cmSystemTools::GetEnv("VERBOSE") != 0; + // verbose output. This can be skipped by also setting CMAKE_NO_VERBOSE + // (which is set by the Eclipse and KDevelop generators). + bool verbose = ((cmSystemTools::GetEnv("VERBOSE") != 0) + && (cmSystemTools::GetEnv("CMAKE_NO_VERBOSE") == 0)); // Create a cmake object instance to process dependencies. cmake cm; @@ -2520,9 +2522,11 @@ 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; - + // output. This can be skipped by setting CMAKE_NO_VERBOSE (which is set + // by the Eclipse and KDevelop generators). + bool verbose = ((cmSystemTools::GetEnv("VERBOSE") != 0) + && (cmSystemTools::GetEnv("CMAKE_NO_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. |