Skip to content

Commit 10f9f57

Browse files
authored
Fix llvm_process_sources to append source file properties instead of overriding it (#151251)
This fixes the CLANG_VENDOR macro that disappeared because it is set using the same mechanism and one was overriding the other.
1 parent 78c460b commit 10f9f57

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/cmake/modules/LLVMProcessSources.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ function(llvm_process_sources OUT_VAR)
6262
get_filename_component(suf ${fn} EXT)
6363
if("${suf}" STREQUAL ".cpp" OR "${suf}" STREQUAL ".c")
6464
get_filename_component(short_name ${fn} NAME)
65-
set_source_files_properties(${fn} PROPERTIES COMPILE_DEFINITIONS "__SHORT_FILE__=\"${short_name}\"")
65+
set_property(
66+
SOURCE ${fn}
67+
APPEND
68+
PROPERTY COMPILE_DEFINITIONS __SHORT_FILE__="${short_name}")
6669
endif()
6770
endforeach()
6871

0 commit comments

Comments
 (0)