Browse Source

cmake: Fix Interrogate macro bug causing component sources to get scanned along with their composite counterparts.

Sam Edwards 11 years ago
parent
commit
c82c0df266
1 changed files with 5 additions and 7 deletions
  1. 5 7
      cmake/macros/Interrogate.cmake

+ 5 - 7
cmake/macros/Interrogate.cmake

@@ -71,8 +71,11 @@ function(target_interrogate target)
     # through a property while still preserving the reference.
     # through a property while still preserving the reference.
     set(absolute_sources)
     set(absolute_sources)
     foreach(source ${sources})
     foreach(source ${sources})
-      get_source_file_property(location "${source}" LOCATION)
-      set(absolute_sources ${absolute_sources} ${location})
+      get_source_file_property(exclude "${source}" WRAP_EXCLUDE)
+      if(NOT exclude)
+        get_source_file_property(location "${source}" LOCATION)
+        list(APPEND absolute_sources ${location})
+      endif()
     endforeach(source)
     endforeach(source)
 
 
     set_target_properties("${target}" PROPERTIES IGATE_SOURCES
     set_target_properties("${target}" PROPERTIES IGATE_SOURCES
@@ -134,11 +137,6 @@ function(interrogate_sources target output database module)
         endif()
         endif()
       endforeach(regex)
       endforeach(regex)
 
 
-      get_source_file_property(source_excluded ${source} WRAP_EXCLUDE)
-      if(source_excluded)
-        set(exclude ON)
-      endif()
-
       if(NOT exclude)
       if(NOT exclude)
         # This file is to be scanned by Interrogate. In order to avoid
         # This file is to be scanned by Interrogate. In order to avoid
         # cluttering up the command line, we should first make it relative:
         # cluttering up the command line, we should first make it relative: