Rex Dieter 29094f
From afd4718e69ca380f15d1afcf8816c0c078f6eb68 Mon Sep 17 00:00:00 2001
Rex Dieter 29094f
From: Benjamin Reed <ranger@befunk.com>
Rex Dieter 29094f
Date: Tue, 3 Mar 2009 15:42:18 +0000
Rex Dieter 29094f
Subject: [PATCH 02/33] automoc did not understand .mm files (objc++)
Rex Dieter 29094f
Rex Dieter 29094f
svn path=/trunk/kdesupport/automoc/; revision=934696
Rex Dieter 29094f
---
Rex Dieter 29094f
 Automoc4Config.cmake | 8 ++++----
Rex Dieter 29094f
 kde4automoc.cpp      | 2 +-
Rex Dieter 29094f
 2 files changed, 5 insertions(+), 5 deletions(-)
Rex Dieter 29094f
Rex Dieter 29094f
diff --git a/Automoc4Config.cmake b/Automoc4Config.cmake
Rex Dieter 29094f
index 5fcab74..12e00f7 100644
Rex Dieter 29094f
--- a/Automoc4Config.cmake
Rex Dieter 29094f
+++ b/Automoc4Config.cmake
Rex Dieter 29094f
@@ -105,9 +105,9 @@ macro(AUTOMOC4 _target_NAME _SRCS)
Rex Dieter 29094f
       if(NOT  _generated  AND NOT  _skip)
Rex Dieter 29094f
          get_filename_component(_suffix "${_current_FILE}" EXT)
Rex Dieter 29094f
          # skip every source file that's not C++
Rex Dieter 29094f
-         if(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C")
Rex Dieter 29094f
+         if(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C" OR _suffix STREQUAL ".mm")
Rex Dieter 29094f
              list(APPEND _moc_files ${_abs_current_FILE})
Rex Dieter 29094f
-         endif(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C")
Rex Dieter 29094f
+         endif(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C" OR _suffix STREQUAL ".mm")
Rex Dieter 29094f
       endif(NOT  _generated  AND NOT  _skip)
Rex Dieter 29094f
    endforeach (_current_FILE)
Rex Dieter 29094f
 
Rex Dieter 29094f
@@ -156,7 +156,7 @@ macro(_ADD_AUTOMOC4_TARGET _target_NAME _SRCS)
Rex Dieter 29094f
       if(NOT  _generated  AND NOT  _skip)
Rex Dieter 29094f
          get_filename_component(_suffix "${_current_FILE}" EXT)
Rex Dieter 29094f
          # skip every source file that's not C++
Rex Dieter 29094f
-         if(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C")
Rex Dieter 29094f
+         if(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C" OR _suffix STREQUAL ".mm")
Rex Dieter 29094f
              get_filename_component(_basename "${_current_FILE}" NAME_WE)
Rex Dieter 29094f
              get_filename_component(_abs_path "${_abs_current_FILE}" PATH)
Rex Dieter 29094f
              set(_header "${_abs_path}/${_basename}.h")
Rex Dieter 29094f
@@ -168,7 +168,7 @@ macro(_ADD_AUTOMOC4_TARGET _target_NAME _SRCS)
Rex Dieter 29094f
                 list(APPEND _moc_headers ${_pheader})
Rex Dieter 29094f
              endif(EXISTS "${_pheader}")
Rex Dieter 29094f
              list(APPEND _moc_files ${_abs_current_FILE})
Rex Dieter 29094f
-         endif(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C")
Rex Dieter 29094f
+         endif(_suffix STREQUAL ".cpp" OR _suffix STREQUAL ".cc" OR _suffix STREQUAL ".cxx" OR _suffix STREQUAL ".C" OR _suffix STREQUAL ".mm")
Rex Dieter 29094f
       endif(NOT  _generated  AND NOT  _skip)
Rex Dieter 29094f
    endforeach (_current_FILE)
Rex Dieter 29094f
 
Rex Dieter 29094f
diff --git a/kde4automoc.cpp b/kde4automoc.cpp
Rex Dieter 29094f
index ae2cff4..7636601 100644
Rex Dieter 29094f
--- a/kde4automoc.cpp
Rex Dieter 29094f
+++ b/kde4automoc.cpp
Rex Dieter 29094f
@@ -326,7 +326,7 @@ bool AutoMoc::run()
Rex Dieter 29094f
     foreach (const QString &absFilename, sourceFiles) {
Rex Dieter 29094f
         //qDebug() << absFilename;
Rex Dieter 29094f
         const QFileInfo sourceFileInfo(absFilename);
Rex Dieter 29094f
-        if (absFilename.endsWith(".cpp") || absFilename.endsWith(".cc") ||
Rex Dieter 29094f
+        if (absFilename.endsWith(".cpp") || absFilename.endsWith(".cc") || absFilename.endsWith(".mm") ||
Rex Dieter 29094f
                 absFilename.endsWith(".cxx") || absFilename.endsWith(".C")) {
Rex Dieter 29094f
             //qDebug() << "check .cpp file";
Rex Dieter 29094f
             QFile sourceFile(absFilename);
Rex Dieter 29094f
-- 
Rex Dieter 29094f
2.4.3
Rex Dieter 29094f