CTest: Report tests not run due to unknown configuration

When add_test(NAME) is called without the CONFIGURATIONS argument then
the test is intended to run in any configuration.  In multi-config
generators like the VS IDE and Xcode tests created by add_test(NAME) can
only be run when testing a known configuration (otherwise there is no
way to generate the test command line).  If no test command line is
known for a particular configuration, or if no configuration is given to
ctest, report the test as not run instead of silently skipping it.

Also fix CMake's own TestsWorkingDirectory test invocation to correct a
previously silent failure exposed by this change.
This commit is contained in:
Brad King
2011-06-10 09:29:30 -04:00
parent 77ddb6a0cd
commit a4ec24269b
5 changed files with 47 additions and 1 deletions

View File

@@ -34,6 +34,8 @@ protected:
virtual void GenerateScriptForConfig(std::ostream& os,
const char* config,
Indent const& indent);
virtual void GenerateScriptNoConfig(std::ostream& os, Indent const& indent);
virtual bool NeedsScriptNoConfig() const;
void GenerateOldStyle(std::ostream& os, Indent const& indent);
cmTest* Test;