summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-25 13:30:49 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-25 13:30:49 (GMT)
commit6736678ca367da834c1a9ca89b48ad2e02a30f9b (patch)
tree9a723b030be1bddf541f07d8ad0e278974b49210 /Source/cmSystemTools.h
parentc6384c19b4793f1e18414c8f92780cd80d80c7a8 (diff)
downloadCMake-6736678ca367da834c1a9ca89b48ad2e02a30f9b.zip
CMake-6736678ca367da834c1a9ca89b48ad2e02a30f9b.tar.gz
CMake-6736678ca367da834c1a9ca89b48ad2e02a30f9b.tar.bz2
Add detection of file format from extension
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 422bfc6..716c2cf 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -287,6 +287,30 @@ public:
static void DisableRunCommandOutput() {s_DisableRunCommandOutput = true; }
static void EnableRunCommandOutput() {s_DisableRunCommandOutput = false; }
static bool GetRunCommandOutput() { return s_DisableRunCommandOutput; }
+
+ /**
+ * Come constants for different file formats.
+ */
+ enum e_FileFormat {
+ NO_FILE_FORMAT = 0,
+ C_FILE_FORMAT,
+ CXX_FILE_FORMAT,
+ JAVA_FILE_FORMAT,
+ HEADER_FILE_FORMAT,
+ RESOURCE_FILE_FORMAT,
+ DEFINITION_FILE_FORMAT,
+ STATIC_LIBRARY_FILE_FORMAT,
+ SHARED_LIBRARY_FILE_FORMAT,
+ MODULE_FILE_FORMAT,
+ OBJECT_FILE_FORMAT,
+ UNKNOWN_FILE_FORMAT
+ };
+
+ /**
+ * Determine the file type based on the extension
+ */
+ static e_FileFormat GetFileFormat(const char* ext);
+
protected:
// these two functions can be called from ConvertToOutputPath
/**
@@ -302,7 +326,6 @@ protected:
* if there are spaces in the string it is double quoted.
*/
static std::string ConvertToWindowsOutputPath(const char*);
-
private:
static bool s_ErrorOccured;