summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-25 13:31:13 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-25 13:31:13 (GMT)
commit6ff1579ba7501da1f9ab677f9a506c75e6ff8a55 (patch)
treebf4f6aa1d83de162ec5b8b8015d478c4abe5148c /Source
parent6736678ca367da834c1a9ca89b48ad2e02a30f9b (diff)
downloadCMake-6ff1579ba7501da1f9ab677f9a506c75e6ff8a55.zip
CMake-6ff1579ba7501da1f9ab677f9a506c75e6ff8a55.tar.gz
CMake-6ff1579ba7501da1f9ab677f9a506c75e6ff8a55.tar.bz2
Use file format detection
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 2e6bdb7..536c12e 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -1890,8 +1890,9 @@ OutputBuildObjectFromSource(std::ostream& fout,
comment += objectFile + " From ";
comment += source.GetFullPath();
std::string compileCommand;
- std::string ext = source.GetSourceExtension();
- if(ext == "c" )
+ cmSystemTools::e_FileFormat format =
+ cmSystemTools::GetFileFormat(source.GetSourceExtension().c_str());
+ if( format == cmSystemTools::C_FILE_FORMAT )
{
compileCommand = "$(CMAKE_C_COMPILER) $(CMAKE_C_FLAGS) ";
compileCommand += extraCompileFlags;
@@ -1905,7 +1906,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
compileCommand += " -o ";
compileCommand += objectFile;
}
- else
+ else if ( format == cmSystemTools::CXX_FILE_FORMAT )
{
compileCommand = "$(CMAKE_CXX_COMPILER) $(CMAKE_CXX_FLAGS) ";
compileCommand += extraCompileFlags;