summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.h
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2015-02-16 20:24:55 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-23 15:01:58 (GMT)
commit12db113944860269b72093424b17ad2f86bccf2f (patch)
tree7f8162e5f5d5383a72a9e836a1a1957402416e0d /Source/cmCTest.h
parente2b9e7f7bc1b4e3a36e8b19fc9925b358b5c99e0 (diff)
downloadCMake-12db113944860269b72093424b17ad2f86bccf2f.zip
CMake-12db113944860269b72093424b17ad2f86bccf2f.tar.gz
CMake-12db113944860269b72093424b17ad2f86bccf2f.tar.bz2
CTest: Add cmCTestOptionalLog macro
cmCTestOptionalLog takes a boolean argument that indicates whether or not the message should be suppressed. Note that error messages will still be printed, even if suppression is requested. This macro will allow us to provide more fine-grained control over what messages CTest prints to the console.
Diffstat (limited to 'Source/cmCTest.h')
-rw-r--r--Source/cmCTest.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index deb8896..88191c4 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -33,6 +33,14 @@ class cmCTestStartCommand;
cmCTestLog_msg.str().c_str());\
} while ( 0 )
+#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \
+ do { \
+ std::ostringstream cmCTestLog_msg; \
+ cmCTestLog_msg << msg; \
+ (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__,\
+ cmCTestLog_msg.str().c_str(), suppress);\
+ } while ( 0 )
+
#ifdef cerr
# undef cerr
#endif
@@ -173,7 +181,8 @@ public:
static int GetTestModelFromString(const char* str);
static std::string CleanString(const std::string& str);
std::string GetCTestConfiguration(const std::string& name);
- void SetCTestConfiguration(const char *name, const char* value);
+ void SetCTestConfiguration(const char *name, const char* value,
+ bool suppress=false);
void EmptyCTestConfiguration();
/**
@@ -332,7 +341,7 @@ public:
* Set the CTest variable from CMake variable
*/
bool SetCTestConfigurationFromCMakeVariable(cmMakefile* mf,
- const char* dconfig, const std::string& cmake_var);
+ const char* dconfig, const std::string& cmake_var, bool suppress=false);
//! Make string safe to be send as an URL
static std::string MakeURLSafe(const std::string&);
@@ -376,7 +385,8 @@ public:
};
//! Add log to the output
- void Log(int logType, const char* file, int line, const char* msg);
+ void Log(int logType, const char* file, int line, const char* msg,
+ bool suppress=false);
//! Get the version of dart server
int GetDartVersion() { return this->DartVersion; }