summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-08-05 18:27:47 (GMT)
committerBrad King <brad.king@kitware.com>2003-08-05 18:27:47 (GMT)
commit27289e32678663b8d71b842b9e8e5b1b5909d30f (patch)
tree7b5b837a09a3ed9d55b6972b97a89e2b44e04e3b /Source
parent878b5792b9966c91a5bc9dd9e032ff043c9cc505 (diff)
downloadCMake-27289e32678663b8d71b842b9e8e5b1b5909d30f.zip
CMake-27289e32678663b8d71b842b9e8e5b1b5909d30f.tar.gz
CMake-27289e32678663b8d71b842b9e8e5b1b5909d30f.tar.bz2
ENH: Added SetOption/GetOption methods for platform-specific options.
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/Process.h.in23
-rw-r--r--Source/kwsys/ProcessUNIX.c16
-rw-r--r--Source/kwsys/ProcessWin32.c16
3 files changed, 55 insertions, 0 deletions
diff --git a/Source/kwsys/Process.h.in b/Source/kwsys/Process.h.in
index 7fb6819..c97212f 100644
--- a/Source/kwsys/Process.h.in
+++ b/Source/kwsys/Process.h.in
@@ -32,6 +32,10 @@
#define kwsysProcess_SetCommand kwsys(Process_SetCommand)
#define kwsysProcess_SetTimeout kwsys(Process_SetTimeout)
#define kwsysProcess_SetWorkingDirectory kwsys(Process_SetWorkingDirectory)
+#define kwsysProcess_Option_HideWindow kwsys(Process_Option_HideWindow)
+#define kwsysProcess_GetOption kwsys(Process_GetOption)
+#define kwsysProcess_SetOption kwsys(Process_SetOption)
+#define kwsysProcess_Option_e kwsys(Process_Option_e)
#define kwsysProcess_State_Starting kwsys(Process_State_Starting)
#define kwsysProcess_State_Error kwsys(Process_State_Error)
#define kwsysProcess_State_Exception kwsys(Process_State_Exception)
@@ -106,6 +110,21 @@ kwsysEXPORT void kwsysProcess_SetWorkingDirectory(kwsysProcess* cp,
const char* dir);
/**
+ * Get/Set a platform-specific option. Possible options are:
+ *
+ * kwsysProcess_Option_HideWindow = Whether to hide window on Windows.
+ * 0 = No (default)
+ * 1 = Yes
+ */
+kwsysEXPORT int kwsysProcess_GetOption(kwsysProcess* cp, int optionId);
+kwsysEXPORT void kwsysProcess_SetOption(kwsysProcess* cp, int optionId,
+ int value);
+enum kwsysProcess_Option_e
+{
+ kwsysProcess_Option_HideWindow
+};
+
+/**
* Get the current state of the Process instance. Possible states are:
*
* kwsysProcess_State_Starting = Execute has not yet been called.
@@ -263,6 +282,10 @@ kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
# undef kwsysProcess_SetCommand
# undef kwsysProcess_SetTimeout
# undef kwsysProcess_SetWorkingDirectory
+# undef kwsysProcess_Option_HideWindow
+# undef kwsysProcess_GetOption
+# undef kwsysProcess_SetOption
+# undef kwsysProcess_Option_e
# undef kwsysProcess_State_Starting
# undef kwsysProcess_State_Error
# undef kwsysProcess_State_Exception
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index d0fa5eb..b48d055 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -235,6 +235,22 @@ void kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, const char* dir)
}
/*--------------------------------------------------------------------------*/
+int kwsysProcess_GetOption(kwsysProcess* cp, int optionId)
+{
+ (void)cp;
+ (void)optionId;
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+void kwsysProcess_SetOption(kwsysProcess* cp, int optionId, int value)
+{
+ (void)cp;
+ (void)optionId;
+ (void)value;
+}
+
+/*--------------------------------------------------------------------------*/
int kwsysProcess_GetState(kwsysProcess* cp)
{
return cp->State;
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index 3ef113c..1735782 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -636,6 +636,22 @@ void kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, const char* dir)
}
/*--------------------------------------------------------------------------*/
+int kwsysProcess_GetOption(kwsysProcess* cp, int optionId)
+{
+ (void)cp;
+ (void)optionId;
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+void kwsysProcess_SetOption(kwsysProcess* cp, int optionId, int value)
+{
+ (void)cp;
+ (void)optionId;
+ (void)value;
+}
+
+/*--------------------------------------------------------------------------*/
int kwsysProcess_GetState(kwsysProcess* cp)
{
return cp->State;