From 88cd4c1e923817f0a38bbc9d14d0bf40a2151897 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 7 Dec 2010 14:17:50 -0500 Subject: [PATCH] Use 'CMake Warning' versus 'warning' for CDash --- Source/cmCommandArgumentParserHelper.cxx | 2 +- Source/cmMakefile.cxx | 2 +- Source/cmake.cxx | 2 +- Tests/CMakeLists.txt | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 23101b86c..decdaaaf8 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -138,7 +138,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) { cmOStringStream msg; msg << this->FileName << ":" << this->FileLine << ":" << - " warning: uninitialized variable \'" << var << "\'"; + " CMake Warning: uninitialized variable \'" << var << "\'"; cmSystemTools::Message(msg.str().c_str()); } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ed435dac9..016d5fea9 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1800,7 +1800,7 @@ void cmMakefile::CheckForUnused(const char* reason, const char* name) const { cmOStringStream msg; msg << path << ":" << line << ":" << - " warning: (" << reason << ") unused variable \'" << name << "\'"; + " CMake Warning: (" << reason << ") unused variable \'" << name << "\'"; cmSystemTools::Message(msg.str().c_str()); } } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index d9217ff9c..8c12ca910 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -4511,7 +4511,7 @@ void cmake::RunCheckForUnusedVariables(const std::string& reason) const { if(!it->second) { - std::string message = "warning: The variable, '" + it->first + + std::string message = "CMake Warning: The variable, '" + it->first + "', given on the command line, was not used during the " + reason + "."; cmSystemTools::Message(message.c_str()); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ac363279f..4cfbf9392 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1099,9 +1099,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-project WarnUnusedUnusedViaSet --build-options "--warn-unused-vars") SET_TESTS_PROPERTIES(WarnUnusedUnusedViaSet PROPERTIES - PASS_REGULAR_EXPRESSION "warning: \\(changing definition\\) unused variable 'UNUSED_VARIABLE'") + PASS_REGULAR_EXPRESSION "CMake Warning: \\(changing definition\\) unused variable 'UNUSED_VARIABLE'") SET_TESTS_PROPERTIES(WarnUnusedUnusedViaSet PROPERTIES - FAIL_REGULAR_EXPRESSION "warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") + FAIL_REGULAR_EXPRESSION "CMake Warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaSet") ADD_TEST(WarnUnusedUnusedViaUnset ${CMAKE_CTEST_COMMAND} @@ -1114,9 +1114,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-project WarnUnusedUnusedViaUnset --build-options "--warn-unused-vars") SET_TESTS_PROPERTIES(WarnUnusedUnusedViaUnset PROPERTIES - PASS_REGULAR_EXPRESSION ":7: warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") + PASS_REGULAR_EXPRESSION ":7: CMake Warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") SET_TESTS_PROPERTIES(WarnUnusedUnusedViaUnset PROPERTIES - FAIL_REGULAR_EXPRESSION ":5: warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") + FAIL_REGULAR_EXPRESSION ":5: CMake Warning: \\(unsetting\\) unused variable 'UNUSED_VARIABLE'") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset") ADD_TEST(WarnUnusedCliUnused ${CMAKE_CTEST_COMMAND} @@ -1129,7 +1129,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-project WarnUnusedCliUnused --build-options "-DUNUSED_CLI_VARIABLE=Unused") SET_TESTS_PROPERTIES(WarnUnusedCliUnused PROPERTIES - PASS_REGULAR_EXPRESSION "warning: The variable, 'UNUSED_CLI_VARIABLE'") + PASS_REGULAR_EXPRESSION "CMake Warning: The variable, 'UNUSED_CLI_VARIABLE'") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedCliUnused") ADD_TEST(WarnUnusedCliUsed ${CMAKE_CTEST_COMMAND} @@ -1144,7 +1144,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ SET_TESTS_PROPERTIES(WarnUnusedCliUsed PROPERTIES PASS_REGULAR_EXPRESSION "Usage proven") SET_TESTS_PROPERTIES(WarnUnusedCliUsed PROPERTIES - FAIL_REGULAR_EXPRESSION "warning: The variable, 'USED_VARIABLE'") + FAIL_REGULAR_EXPRESSION "CMake Warning: The variable, 'USED_VARIABLE'") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedCliUsed") ADD_TEST(WarnUninitialized ${CMAKE_CTEST_COMMAND} @@ -1157,7 +1157,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-project WarnUninitialized --build-options "--warn-uninitialized") SET_TESTS_PROPERTIES(WarnUninitialized PROPERTIES - PASS_REGULAR_EXPRESSION "warning: uninitialized variable 'USED_VARIABLE'") + PASS_REGULAR_EXPRESSION "CMake Warning: uninitialized variable 'USED_VARIABLE'") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUninitialized") # Make sure CTest can handle a test with no newline in output.