summaryrefslogtreecommitdiffstats
path: root/Source/cmOutputConverter.h
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmOutputConverter.h
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
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;