summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-13 14:54:28 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-13 14:54:28 (GMT)
commit732788d191afca01f19a147b74bfe145ce36b957 (patch)
tree365f744fca8259c92d5eef6b0503fb244ec53d01
parent17b5c79d155bdeeaebc49724059c8a1001c63bf2 (diff)
downloadCMake-732788d191afca01f19a147b74bfe145ce36b957.zip
CMake-732788d191afca01f19a147b74bfe145ce36b957.tar.gz
CMake-732788d191afca01f19a147b74bfe145ce36b957.tar.bz2
BUG: make MARK_AS_ADVANCED() scriptable, because this is the only reason
many cmake FindXXX.cmake modules can't be used in script mode and also FindUnixMake.cmake, which is required by the CTEST_BUILD() command Alex
-rw-r--r--Source/cmMarkAsAdvancedCommand.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h
index f764725..de267c9 100644
--- a/Source/cmMarkAsAdvancedCommand.h
+++ b/Source/cmMarkAsAdvancedCommand.h
@@ -69,9 +69,18 @@ public:
"If FORCE is the first argument, then the variable is made advanced. "
"If neither FORCE nor CLEAR is specified, new values will be marked as "
"advanced, but if the variable already has an advanced/non-advanced "
- "state, it will not be changed.";
+ "state, it will not be changed.\n"
+ "It does nothing in script mode.";
}
-
+
+ /**
+ * This determines if the command is invoked when in script mode.
+ * MARK_AS_ADVANCED() will have no effect in script mode, but this will
+ * make many of the modules usable in cmake/ctest scripts, (among them
+ * FindUnixMake.cmake used by the CTEST_BUILD command.
+ */
+ virtual bool IsScriptable() { return true; }
+
cmTypeMacro(cmMarkAsAdvancedCommand, cmCommand);
};