[libunwind][CMake] Set TARGET_TRIPLE if LIBUNWND_TARGET_TRIPLE is set
This follows the setup used by other runtimes and is expected by
the lit configuration.
Differential Revision: https://reviews.llvm.org/D40820
git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@319830 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8ede54..b28e4d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -211,6 +211,10 @@
add_target_flags_if(LIBUNWIND_SYSROOT
"--sysroot=${LIBUNWIND_SYSROOT}")
+if (LIBUNWIND_TARGET_TRIPLE)
+ set(TARGET_TRIPLE "${LIBUNWIND_TARGET_TRIPLE}")
+endif()
+
# Configure compiler.
include(config-ix)