@@ -17,9 +17,9 @@ set(_sonarcloud_newline "\\\n ")
1717function (transform_sonarcloud_source_files output_variable target )
1818 #
1919 # Based off of https://cmake.org/cmake/help/latest/prop_tgt/SOURCES.html we
20- # need to correcty interpret the SOURCES properties to be able to transform
21- # them into what sonarcloud project properties is comfortable with (ie. paths
22- # from project source directory
20+ # need to correctly interpret the SOURCES properties to be able to transform
21+ # them into what sonarcloud project properties is comfortable with (ie.
22+ # relative path from project source directory).
2323 #
2424 get_target_property (target_binary_dir ${target} BUILD_DIR)
2525 get_target_property (target_source_dir ${target} SOURCE_DIR)
@@ -85,17 +85,8 @@ function(extract_sonarcloud_project_files output_project_source_files output_pro
8585
8686 foreach (target IN LISTS ARGN)
8787 get_target_property (target_type ${target} TYPE )
88- if (${target_type} STREQUAL "INTERFACE_LIBRARY" )
89- get_target_property (swift_project ${target} INTERFACE_SWIFT_PROJECT)
90- else ()
91- get_target_property (swift_project ${target} SWIFT_PROJECT)
92- endif ()
93-
94- if (NOT ${swift_project} STREQUAL ${PROJECT_NAME} )
95- continue ()
96- endif ()
9788
98- if (NOT ${ target_type} STREQUAL "INTERFACE_LIBRARY" )
89+ if (NOT target_type STREQUAL "INTERFACE_LIBRARY" )
9990 get_target_property (target_source_files ${target} SOURCES )
10091 if (target_source_files)
10192 transform_sonarcloud_source_files(target_source_files ${target} ${target_source_files} )
@@ -140,7 +131,7 @@ endfunction()
140131function (generate_sonarcloud_project_properties sonarcloud_project_properties_path)
141132 if (NOT IS_ABSOLUTE ${sonarcloud_project_properties_path} )
142133 message (FATAL_ERROR "Function \" generate_sonarcloud_project_properties\" "
143- "only accepts sonarcloud project properties output as absolute paths " )
134+ "only accepts absolute paths to avoid ambiguity " )
144135 endif ()
145136
146137 if (NOT ${PROJECT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} )
0 commit comments