BUG: fix some bad changes in progress calc
[cmake.git] / Source / kwsys / System.h.in
blobc8bae4cb25ce98a11dda871dba29ef74d4716e97
1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: System.h.in,v $
6 Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
13 =========================================================================*/
14 #ifndef @KWSYS_NAMESPACE@_System_h
15 #define @KWSYS_NAMESPACE@_System_h
17 #include <@KWSYS_NAMESPACE@/Configure.h>
19 /* Redefine all public interface symbol names to be in the proper
20 namespace. These macros are used internally to kwsys only, and are
21 not visible to user code. Use kwsysHeaderDump.pl to reproduce
22 these macros after making changes to the interface. */
23 #if !defined(KWSYS_NAMESPACE)
24 # define kwsys_ns(x) @KWSYS_NAMESPACE@##x
25 # define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
26 #endif
27 #define kwsysSystem_Shell_GetArgumentForWindows kwsys_ns(System_Shell_GetArgumentForWindows)
28 #define kwsysSystem_Shell_GetArgumentForUnix kwsys_ns(System_Shell_GetArgumentForUnix)
29 #define kwsysSystem_Shell_GetArgumentSizeForWindows kwsys_ns(System_Shell_GetArgumentSizeForWindows)
30 #define kwsysSystem_Shell_GetArgumentSizeForUnix kwsys_ns(System_Shell_GetArgumentSizeForUnix)
31 #define kwsysSystem_Shell_Flag_e kwsys_ns(System_Shell_Flag_e)
32 #define kwsysSystem_Shell_Flag_Make kwsys_ns(System_Shell_Flag_Make)
33 #define kwsysSystem_Shell_Flag_VSIDE kwsys_ns(System_Shell_Flag_VSIDE)
34 #define kwsysSystem_Shell_Flag_EchoWindows kwsys_ns(System_Shell_Flag_EchoWindows)
35 #define kwsysSystem_Shell_Flag_WatcomWMake kwsys_ns(System_Shell_Flag_WatcomWMake)
36 #define kwsysSystem_Shell_Flag_MinGWMake kwsys_ns(System_Shell_Flag_MinGWMake)
37 #define kwsysSystem_Shell_Flag_NMake kwsys_ns(System_Shell_Flag_NMake)
38 #define kwsysSystem_Shell_Flag_AllowMakeVariables kwsys_ns(System_Shell_Flag_AllowMakeVariables)
40 #if defined(__cplusplus)
41 extern "C"
43 #endif
45 /**
46 * Transform the given command line argument for use in a Windows or
47 * Unix shell. Returns a pointer to the end of the command line
48 * argument in the provided output buffer. Flags may be passed to
49 * modify the generated quoting and escape sequences to work under
50 * alternative environments.
52 kwsysEXPORT char* kwsysSystem_Shell_GetArgumentForWindows(const char* in,
53 char* out,
54 int flags);
55 kwsysEXPORT char* kwsysSystem_Shell_GetArgumentForUnix(const char* in,
56 char* out,
57 int flags);
59 /**
60 * Compute the size of the buffer required to store the output from
61 * kwsysSystem_Shell_GetArgumentForWindows or
62 * kwsysSystem_Shell_GetArgumentForUnix. The flags passed must be
63 * identical between the two calls.
65 kwsysEXPORT int kwsysSystem_Shell_GetArgumentSizeForWindows(const char* in,
66 int flags);
67 kwsysEXPORT int kwsysSystem_Shell_GetArgumentSizeForUnix(const char* in,
68 int flags);
70 /**
71 * Flags to pass to kwsysSystem_Shell_GetArgumentForWindows or
72 * kwsysSystem_Shell_GetArgumentForUnix. These modify the generated
73 * quoting and escape sequences to work under alternative
74 * environments.
76 enum kwsysSystem_Shell_Flag_e
78 /** The target shell is in a makefile. */
79 kwsysSystem_Shell_Flag_Make = (1<<0),
81 /** The target shell is in a VS project file. Do not use with
82 Shell_Flag_Make. */
83 kwsysSystem_Shell_Flag_VSIDE = (1<<1),
85 /** In a windows shell the argument is being passed to "echo". */
86 kwsysSystem_Shell_Flag_EchoWindows = (1<<2),
88 /** The target shell is in a Watcom WMake makefile. */
89 kwsysSystem_Shell_Flag_WatcomWMake = (1<<3),
91 /** The target shell is in a MinGW Make makefile. */
92 kwsysSystem_Shell_Flag_MinGWMake = (1<<4),
94 /** The target shell is in a NMake makefile. */
95 kwsysSystem_Shell_Flag_NMake = (1<<6),
97 /** Make variable reference syntax $(MAKEVAR) should not be escaped
98 to allow a build tool to replace it. Replacement values
99 containing spaces, quotes, backslashes, or other
100 non-alphanumeric characters that have significance to some makes
101 or shells produce undefined behavior. */
102 kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<5)
105 #if defined(__cplusplus)
106 } /* extern "C" */
107 #endif
109 /* If we are building a kwsys .c or .cxx file, let it use these macros.
110 Otherwise, undefine them to keep the namespace clean. */
111 #if !defined(KWSYS_NAMESPACE)
112 # undef kwsys_ns
113 # undef kwsysEXPORT
114 # undef kwsysSystem_Shell_GetArgumentForWindows
115 # undef kwsysSystem_Shell_GetArgumentForUnix
116 # undef kwsysSystem_Shell_GetArgumentSizeForWindows
117 # undef kwsysSystem_Shell_GetArgumentSizeForUnix
118 # undef kwsysSystem_Shell_Flag_e
119 # undef kwsysSystem_Shell_Flag_Make
120 # undef kwsysSystem_Shell_Flag_VSIDE
121 # undef kwsysSystem_Shell_Flag_EchoWindows
122 # undef kwsysSystem_Shell_Flag_WatcomWMake
123 # undef kwsysSystem_Shell_Flag_MinGWMake
124 # undef kwsysSystem_Shell_Flag_NMake
125 # undef kwsysSystem_Shell_Flag_AllowMakeVariables
126 #endif
128 #endif