added: support object libraries in static analysis macro

This commit is contained in:
Arne Morten Kvarving 2019-07-09 10:35:10 +02:00
parent 748fd20e57
commit 3e576b6332

View File

@ -34,6 +34,10 @@ function(add_static_analysis_tests sources includes)
list(APPEND IPATHS -I ${dep})
endforeach()
foreach(src ${${sources}})
if(src MATCHES "TARGET_OBJECTS:")
string(REGEX REPLACE "\\$<TARGET_OBJECTS:(.*)>" "\\1" TGT ${src})
get_target_property(src ${TGT} SOURCES)
endif()
if(IS_ABSOLUTE ${src})
file(RELATIVE_PATH name ${PROJECT_SOURCE_DIR} ${src})
else()