Files
swift-mirror/cmake/modules/SwiftDarwin.cmake
2017-02-17 14:21:52 +07:00

8 lines
292 B
CMake

function(find_toolchain_tool result_var_name toolchain tool)
execute_process(
COMMAND "xcrun" "--toolchain" "${toolchain}" "--find" "${tool}"
OUTPUT_VARIABLE tool_path
OUTPUT_STRIP_TRAILING_WHITESPACE)
set("${result_var_name}" "${tool_path}" PARENT_SCOPE)
endfunction()