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)
5858 set (sources ${ARG_UNPARSED_ARGUMENTS} )
5959 llvm_check_source_file_list(${sources} )
6060
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 VS builds as it can prevent build parallelisation.
62+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
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 ()
7174
7275
7376 # This adds .td and .h files to the Visual Studio solution:
You can’t perform that action at this time.
0 commit comments