diff options
author | Brad King <brad.king@kitware.com> | 2005-04-13 20:47:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-04-13 20:47:19 (GMT) |
commit | 7297496a34de5ef2d02129b7be5ea1208a859bb0 (patch) | |
tree | bda9efa45c7b903bb2e664abd11d789c3b8d46ec /Source | |
parent | caf54b20931408c1b5d878b1cf2a76147ab61454 (diff) | |
download | CMake-7297496a34de5ef2d02129b7be5ea1208a859bb0.zip CMake-7297496a34de5ef2d02129b7be5ea1208a859bb0.tar.gz CMake-7297496a34de5ef2d02129b7be5ea1208a859bb0.tar.bz2 |
ENH: Removing old test1.c Process execution example. It is fully replaced by testProcess.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Source/kwsys/test1.cxx | 52 |
2 files changed, 0 insertions, 53 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 7926da1..c7968d8 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -464,7 +464,6 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) testSystemTools testIOS testhash - test1 testCommandLineArguments ) ADD_EXECUTABLE(${test} ${test}.cxx) diff --git a/Source/kwsys/test1.cxx b/Source/kwsys/test1.cxx deleted file mode 100644 index 137f83e..0000000 --- a/Source/kwsys/test1.cxx +++ /dev/null @@ -1,52 +0,0 @@ -/*========================================================================= - - Program: KWSys - Kitware System Library - Module: $RCSfile$ - - Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#include "kwsysPrivate.h" -#include KWSYS_HEADER(Directory.hxx) -#include KWSYS_HEADER(Process.h) -#include KWSYS_HEADER(ios/iostream) - -// Work-around CMake dependency scanning limitation. This must -// duplicate the above list of headers. -#if 0 -# include "Directory.hxx.in" -# include "Process.h.in" -# include "kwsys_ios_iostream.h.in" -#endif - -int main() -{ - kwsys::Directory(); - kwsysProcess* kp = kwsysProcess_New(); - const char* cmd[] = {"echo", "Hello, World!", 0}; - kwsysProcess_SetCommand(kp, cmd); - kwsysProcess_Execute(kp); - char* data = 0; - int length = 0; - while(kwsysProcess_WaitForData(kp, &data, &length, 0)) - { - kwsys_ios::cout.write(data, length); - } - kwsysProcess_WaitForExit(kp, 0); - if(kwsysProcess_GetState(kp) == kwsysProcess_State_Error) - { - kwsys_ios::cout << kwsysProcess_GetErrorString(kp) << kwsys_ios::endl; - } - else if(kwsysProcess_GetState(kp) == kwsysProcess_State_Exception) - { - kwsys_ios::cout << kwsysProcess_GetExceptionString(kp) << kwsys_ios::endl; - } - kwsysProcess_Delete(kp); - kwsys_ios::cout << kwsys_ios::endl; - return 0; -} |