File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ if(TEST_SUITE_FORTRAN)
37
37
mark_as_advanced (CLEAR CMAKE_Fortran_COMPILER )
38
38
endif ()
39
39
40
+ if (CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_SIMULATE_ID MATCHES "MSVC" )
41
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /FIstdio.h" )
42
+ endif ()
43
+
40
44
# The files in cmake/caches often want to pass along additional flags to select
41
45
# the target architecture. Note that you should still use
42
46
# CMAKE_OSX_ARCHITECTURES and CMAKE_C_COMPILER_TARGET where possible.
@@ -299,6 +303,12 @@ mark_as_advanced(TEST_SUITE_LIT TEST_SUITE_LIT_FLAGS)
299
303
mark_as_advanced (TEST_SUITE_LIT )
300
304
301
305
add_subdirectory (tools )
306
+
307
+ # Turn on ignore whitespacing on WIN32 to avoid line-ending mismatch
308
+ if (TARGET_OS STREQUAL "Windows" )
309
+ set (FP_IGNOREWHITESPACE ON )
310
+ endif ()
311
+
302
312
# Shortcut for the path to the fpcmp executable
303
313
set (FPCMP fpcmp-target )
304
314
if (TEST_SUITE_USER_MODE_EMULATION )
Original file line number Diff line number Diff line change @@ -16,10 +16,17 @@ function(llvm_copy target to from)
16
16
)
17
17
endfunction ()
18
18
19
+ # On Windows create_symlink requires special permissions. Use copy_if_different instead.
20
+ if (CMAKE_HOST_WIN32 )
21
+ set (_link_or_copy copy_if_different )
22
+ else ()
23
+ set (_link_or_copy create_symlink )
24
+ endif ()
25
+
19
26
function (llvm_create_symlink target to from )
20
27
add_custom_command (
21
28
TARGET ${target} POST_BUILD
22
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${from} ${to}
29
+ COMMAND ${CMAKE_COMMAND} -E ${_link_or_copy} ${from} ${to}
23
30
)
24
31
endfunction ()
25
32
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ function(llvm_test_executable_no_test target)
65
65
66
66
if (TEST_SUITE_LLVM_SIZE )
67
67
add_custom_command (TARGET ${target} POST_BUILD
68
- COMMAND ${TEST_SUITE_LLVM_SIZE} --format=sysv $< TARGET_FILE:${target} >
69
- > $< TARGET_FILE:${target} > .size )
68
+ COMMAND ${TEST_SUITE_LLVM_SIZE} --format=sysv $< SHELL_PATH: $< TARGET_FILE:${target} > >
69
+ > $< SHELL_PATH: $< TARGET_FILE:${target} > > .size )
70
70
endif ()
71
71
endfunction ()
72
72
You can’t perform that action at this time.
0 commit comments