File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,19 @@ function(llvm_process_sources OUT_VAR)
58
58
set (sources ${ARG_UNPARSED_ARGUMENTS} )
59
59
llvm_check_source_file_list (${sources} )
60
60
61
- foreach (fn ${sources} )
62
- get_filename_component (suf ${fn} EXT )
63
- if ("${suf} " STREQUAL ".cpp" OR "${suf} " STREQUAL ".c" )
64
- get_filename_component (short_name ${fn} NAME )
65
- set_property (
66
- SOURCE ${fn}
67
- APPEND
68
- PROPERTY COMPILE_DEFINITIONS __SHORT_FILE__= "${short_name} " )
69
- endif ()
70
- endforeach ()
61
+ # Don't generate __SHORT_FILE__ on MSVC builds as it can force repeated cache regeneration.
62
+ if (NOT MSVC )
63
+ foreach (fn ${sources} )
64
+ get_filename_component (suf ${fn} EXT )
65
+ if ("${suf} " STREQUAL ".cpp" OR "${suf} " STREQUAL ".c" )
66
+ get_filename_component (short_name ${fn} NAME )
67
+ set_property (
68
+ SOURCE ${fn}
69
+ APPEND
70
+ PROPERTY COMPILE_DEFINITIONS __SHORT_FILE__= "${short_name} " )
71
+ endif ()
72
+ endforeach ()
73
+ endif ()
71
74
72
75
73
76
# This adds .td and .h files to the Visual Studio solution:
You can’t perform that action at this time.
0 commit comments