[PATCH] File Format is now determined within the Compiler-Specific= Modules<br>


Fri Dec 17 18:32:05 EST 2010


<br>
---<br>
=A0Source/cmSystemTools.cxx | =A0 65 --------------------------------------=
--------<br>
=A0Source/cmSystemTools.h =A0 | =A0 24 -----------------<br>
=A02 files changed, 0 insertions(+), 89 deletions(-)<br>
<br>
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx<br>
index 7bc89a4..31ceaa3 100644<br>
--- a/Source/cmSystemTools.cxx<br>
+++ b/Source/cmSystemTools.cxx<br>
@@ -1432,71 +1432,6 @@ bool cmSystemTools::SimpleGlob(const cmStdString&amp=
; glob,<br>
 =A0 return res;<br>
=A0}<br>
<br>
-cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)<b=
r>
-{<br>
- =A0if ( ! cext || *cext =3D=3D 0 )<br>
- =A0 =A0{<br>
- =A0 =A0return cmSystemTools::NO_FILE_FORMAT;<br>
- =A0 =A0}<br>
- =A0//std::string ext =3D cmSystemTools::LowerCase(cext);<br>
- =A0std::string ext =3D cext;<br>
- =A0if ( ext =3D=3D &quot;c&quot; || ext =3D=3D &quot;.c&quot; ||<br>
- =A0 =A0 =A0 ext =3D=3D &quot;m&quot; || ext =3D=3D &quot;.m&quot;<br>
- =A0 =A0) { return cmSystemTools::C_FILE_FORMAT; }<br>
- =A0if (<br>
- =A0 =A0ext =3D=3D &quot;C&quot; || ext =3D=3D &quot;.C&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;M&quot; || ext =3D=3D &quot;.M&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;c++&quot; || ext =3D=3D &quot;.c++&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;cc&quot; || ext =3D=3D &quot;.cc&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;cpp&quot; || ext =3D=3D &quot;.cpp&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;cxx&quot; || ext =3D=3D &quot;.cxx&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;mm&quot; || ext =3D=3D &quot;.mm&quot;<br>
- =A0 =A0) { return cmSystemTools::CXX_FILE_FORMAT; }<br>
- =A0if (<br>
- =A0 =A0ext =3D=3D &quot;f&quot; || ext =3D=3D &quot;.f&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;F&quot; || ext =3D=3D &quot;.F&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;f77&quot; || ext =3D=3D &quot;.f77&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;f90&quot; || ext =3D=3D &quot;.f90&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;for&quot; || ext =3D=3D &quot;.for&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;f95&quot; || ext =3D=3D &quot;.f95&quot;<br>
- =A0 =A0) { return cmSystemTools::FORTRAN_FILE_FORMAT; }<br>
- =A0if ( ext =3D=3D &quot;java&quot; || ext =3D=3D &quot;.java&quot; )<br>
- =A0 =A0{ return cmSystemTools::JAVA_FILE_FORMAT; }<br>
- =A0if (<br>
- =A0 =A0ext =3D=3D &quot;H&quot; || ext =3D=3D &quot;.H&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;h&quot; || ext =3D=3D &quot;.h&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;h++&quot; || ext =3D=3D &quot;.h++&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;hm&quot; || ext =3D=3D &quot;.hm&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;hpp&quot; || ext =3D=3D &quot;.hpp&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;hxx&quot; || ext =3D=3D &quot;.hxx&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;in&quot; || ext =3D=3D &quot;.in&quot; ||<br>
- =A0 =A0ext =3D=3D &quot;txx&quot; || ext =3D=3D &quot;.txx&quot;<br>
- =A0 =A0) { return cmSystemTools::HEADER_FILE_FORMAT; }<br>
- =A0if ( ext =3D=3D &quot;rc&quot; || ext =3D=3D &quot;.rc&quot; )<br>
- =A0 =A0{ return cmSystemTools::RESOURCE_FILE_FORMAT; }<br>
- =A0if ( ext =3D=3D &quot;def&quot; || ext =3D=3D &quot;.def&quot; )<br>
- =A0 =A0{ return cmSystemTools::DEFINITION_FILE_FORMAT; }<br>
- =A0if ( ext =3D=3D &quot;lib&quot; || ext =3D=3D &quot;.lib&quot; ||<br>
- =A0 =A0 =A0 ext =3D=3D &quot;a&quot; || ext =3D=3D &quot;.a&quot;)<br>
- =A0 =A0{ return cmSystemTools::STATIC_LIBRARY_FILE_FORMAT; }<br>
- =A0if ( ext =3D=3D &quot;o&quot; || ext =3D=3D &quot;.o&quot; ||<br>
- =A0 =A0 =A0 ext =3D=3D &quot;obj&quot; || ext =3D=3D &quot;.obj&quot;)<br=
>
- =A0 =A0{ return cmSystemTools::OBJECT_FILE_FORMAT; }<br>
-#ifdef __APPLE__<br>
- =A0if ( ext =3D=3D &quot;dylib&quot; || ext =3D=3D &quot;.dylib&quot; )<b=
r>
- =A0 =A0{ return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT; }<br>
- =A0if ( ext =3D=3D &quot;so&quot; || ext =3D=3D &quot;.so&quot; ||<br>
- =A0 =A0 =A0 ext =3D=3D &quot;bundle&quot; || ext =3D=3D &quot;.bundle&quo=
t; )<br>
- =A0 =A0{ return cmSystemTools::MODULE_FILE_FORMAT; }<br>
-#else // __APPLE__<br>
- =A0if ( ext =3D=3D &quot;so&quot; || ext =3D=3D &quot;.so&quot; ||<br>
- =A0 =A0 =A0 ext =3D=3D &quot;sl&quot; || ext =3D=3D &quot;.sl&quot; ||<br=
>
- =A0 =A0 =A0 ext =3D=3D &quot;dll&quot; || ext =3D=3D &quot;.dll&quot; )<b=
r>
- =A0 =A0{ return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT; }<br>
-#endif // __APPLE__<br>
- =A0return cmSystemTools::UNKNOWN_FILE_FORMAT;<br>
-}<br>
-<br>
=A0bool cmSystemTools::Split(const char* s, std::vector&lt;cmStdString&gt;&=
amp; l)<br>
=A0{<br>
 =A0 std::vector&lt;std::string&gt; temp;<br>
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h<br>
index 6f9147c..ad7ddc3 100644<br>
--- a/Source/cmSystemTools.h<br>
+++ b/Source/cmSystemTools.h<br>
@@ -249,25 +249,6 @@ public:<br>
 =A0 static void EnableRunCommandOutput() {s_DisableRunCommandOutput =3D fa=
lse; }<br>
 =A0 static bool GetRunCommandOutput() { return s_DisableRunCommandOutput; =
}<br>
<br>
- =A0/**<br>
- =A0 * Come constants for different file formats.<br>
- =A0 */<br>
- =A0enum FileFormat {<br>
- =A0 =A0NO_FILE_FORMAT =3D 0,<br>
- =A0 =A0C_FILE_FORMAT,<br>
- =A0 =A0CXX_FILE_FORMAT,<br>
- =A0 =A0FORTRAN_FILE_FORMAT,<br>
- =A0 =A0JAVA_FILE_FORMAT,<br>
- =A0 =A0HEADER_FILE_FORMAT,<br>
- =A0 =A0RESOURCE_FILE_FORMAT,<br>
- =A0 =A0DEFINITION_FILE_FORMAT,<br>
- =A0 =A0STATIC_LIBRARY_FILE_FORMAT,<br>
- =A0 =A0SHARED_LIBRARY_FILE_FORMAT,<br>
- =A0 =A0MODULE_FILE_FORMAT,<br>
- =A0 =A0OBJECT_FILE_FORMAT,<br>
- =A0 =A0UNKNOWN_FILE_FORMAT<br>
- =A0};<br>
-<br>
 =A0 enum CompareOp {<br>
 =A0 =A0 OP_LESS,<br>
 =A0 =A0 OP_GREATER,<br>
@@ -280,11 +261,6 @@ public:<br>
 =A0 static bool VersionCompare(CompareOp op, const char* lhs, const char* =
rhs);<br>
<br>
 =A0 /**<br>
- =A0 * Determine the file type based on the extension<br>
- =A0 */<br>
- =A0static FileFormat GetFileFormat(const char* ext);<br>
-<br>
- =A0/**<br>
 =A0 =A0* On Windows 9x we need a comspec (<a href=3D"http://command.com" t=
arget=3D"_blank">command.com</a>) substitute to run<br>
 =A0 =A0* programs correctly. This string has to be constant available<br>
 =A0 =A0* through the running of program. This method does not create a cop=
y.<br>
<font color=3D"#888888">--<br>
1.7.1+GitX<br>
</font><div><div></div><div class=3D"h5">__________________________________=
_____________<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at <a href=3D"http://www.kitware.c=
om/opensource/opensource.html" target=3D"_blank">http://www.kitware.com/ope=
nsource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href=3D"http:/=
/www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">http://www.cmake.org/Wiki/=
CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=3D"_blank">h=
ttp://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>

--001636b42df82c696d049807ac1f--


More information about the CMake mailing list