summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-05-18 01:20:47 +0000
committerPetr Hosek <phosek@chromium.org>2018-05-18 01:20:47 +0000
commit83061cc4aa9d7ccf3770772c3954d39b99cc05b5 (patch)
treec6c3ae4df46d3b05d49bfbdb9f3040caff5d57bf /compiler-rt/cmake
parent[CMake] Detect the compiler runtime and standard library (diff)
downloadllvm-project-83061cc4aa9d7ccf3770772c3954d39b99cc05b5.tar.gz
llvm-project-83061cc4aa9d7ccf3770772c3954d39b99cc05b5.tar.bz2
llvm-project-83061cc4aa9d7ccf3770772c3954d39b99cc05b5.zip
[CMake] Use <UNIX|WINDOWS>_COMMAND with separate_arguments
NATIVE_COMMAND is only available since CMake 3.9. llvm-svn: 332684
Diffstat (limited to 'compiler-rt/cmake')
-rw-r--r--compiler-rt/cmake/Modules/CompilerRTUtils.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index d8bbdf638fdc..764c09e7da4d 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -355,7 +355,11 @@ function(check_link_libraries variable)
string(REGEX REPLACE "\r?\n" ";" output_lines "${COMMAND_OUTPUT}")
foreach(line IN LISTS output_lines)
if(line MATCHES "${LINKER_REGEX}" AND NOT line MATCHES "${EXCLUDE_REGEX}")
- separate_arguments(args NATIVE_COMMAND "${line}")
+ if(UNIX)
+ separate_arguments(args UNIX_COMMAND "${line}")
+ else()
+ separate_arguments(args WINDOWS_COMMAND "${line}")
+ endif()
list(GET args 0 cmd)
endif()
if("${cmd}" MATCHES "${LINKER_REGEX}")