summaryrefslogtreecommitdiffstats
path: root/Source/cmOutputConverter.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmOutputConverter.h')
-rw-r--r--Source/cmOutputConverter.h58
1 files changed, 35 insertions, 23 deletions
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index 852df5d..75d6326 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -36,8 +36,23 @@ public:
* optional: should any relative path operation be controlled by the rel
* path setting
*/
- enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
- enum OutputFormat { UNCHANGED, MAKERULE, SHELL, WATCOMQUOTE, RESPONSE };
+ enum RelativeRoot
+ {
+ NONE,
+ FULL,
+ HOME,
+ START,
+ HOME_OUTPUT,
+ START_OUTPUT
+ };
+ enum OutputFormat
+ {
+ UNCHANGED,
+ MAKERULE,
+ SHELL,
+ WATCOMQUOTE,
+ RESPONSE
+ };
std::string ConvertToOutputFormat(const std::string& source,
OutputFormat output) const;
std::string Convert(const std::string& remote, RelativeRoot local,
@@ -46,7 +61,7 @@ public:
OutputFormat output = UNCHANGED,
bool optional = false) const;
std::string ConvertDirectorySeparatorsForShell(
- const std::string& source) const;
+ const std::string& source) const;
/**
* Get path for the specified relative root.
@@ -75,33 +90,33 @@ public:
enum Shell_Flag_e
{
/** The target shell is in a makefile. */
- Shell_Flag_Make = (1<<0),
+ Shell_Flag_Make = (1 << 0),
/** The target shell is in a VS project file. Do not use with
Shell_Flag_Make. */
- Shell_Flag_VSIDE = (1<<1),
+ Shell_Flag_VSIDE = (1 << 1),
/** In a windows shell the argument is being passed to "echo". */
- Shell_Flag_EchoWindows = (1<<2),
+ Shell_Flag_EchoWindows = (1 << 2),
/** The target shell is in a Watcom WMake makefile. */
- Shell_Flag_WatcomWMake = (1<<3),
+ Shell_Flag_WatcomWMake = (1 << 3),
/** The target shell is in a MinGW Make makefile. */
- Shell_Flag_MinGWMake = (1<<4),
+ Shell_Flag_MinGWMake = (1 << 4),
/** The target shell is in a NMake makefile. */
- Shell_Flag_NMake = (1<<5),
+ Shell_Flag_NMake = (1 << 5),
/** Make variable reference syntax $(MAKEVAR) should not be escaped
to allow a build tool to replace it. Replacement values
containing spaces, quotes, backslashes, or other
non-alphanumeric characters that have significance to some makes
or shells produce undefined behavior. */
- Shell_Flag_AllowMakeVariables = (1<<6),
+ Shell_Flag_AllowMakeVariables = (1 << 6),
/** The target shell quoting uses extra single Quotes for Watcom tools. */
- Shell_Flag_WatcomQuote = (1<<7)
+ Shell_Flag_WatcomQuote = (1 << 7)
};
/**
@@ -123,10 +138,9 @@ public:
static int Shell_GetArgumentSizeForWindows(const char* in, int flags);
static int Shell_GetArgumentSizeForUnix(const char* in, int flags);
- std::string EscapeForShell(const std::string& str,
- bool makeVars = false,
- bool forEcho = false,
- bool useWatcomQuote = false) const;
+ std::string EscapeForShell(const std::string& str, bool makeVars = false,
+ bool forEcho = false,
+ bool useWatcomQuote = false) const;
static std::string EscapeForCMake(const std::string& str);
@@ -136,11 +150,11 @@ public:
int shell_flags);
enum FortranFormat
- {
+ {
FortranFormatNone,
FortranFormatFixed,
FortranFormatFree
- };
+ };
static FortranFormat GetFortranFormat(const char* value);
/**
@@ -167,12 +181,10 @@ private:
static int Shell__CharNeedsQuotes(char c, int isUnix, int flags);
static int Shell__CharIsMakeVariableName(char c);
static const char* Shell__SkipMakeVariables(const char* c);
- static int Shell__ArgumentNeedsQuotes(const char* in,
- int isUnix, int flags);
- static int Shell__GetArgumentSize(const char* in,
- int isUnix, int flags);
- static char* Shell__GetArgument(const char* in, char* out,
- int isUnix, int flags);
+ static int Shell__ArgumentNeedsQuotes(const char* in, int isUnix, int flags);
+ static int Shell__GetArgumentSize(const char* in, int isUnix, int flags);
+ static char* Shell__GetArgument(const char* in, char* out, int isUnix,
+ int flags);
private:
cmState::Snapshot StateSnapshot;