diff --git a/cmake/macros/Interrogate.cmake b/cmake/macros/Interrogate.cmake index 0025cc9161..66398fb772 100644 --- a/cmake/macros/Interrogate.cmake +++ b/cmake/macros/Interrogate.cmake @@ -71,8 +71,11 @@ function(target_interrogate target) # through a property while still preserving the reference. set(absolute_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) set_target_properties("${target}" PROPERTIES IGATE_SOURCES @@ -134,11 +137,6 @@ function(interrogate_sources target output database module) endif() endforeach(regex) - get_source_file_property(source_excluded ${source} WRAP_EXCLUDE) - if(source_excluded) - set(exclude ON) - endif() - if(NOT exclude) # This file is to be scanned by Interrogate. In order to avoid # cluttering up the command line, we should first make it relative: