From 19c8451a0e798abcfd1762fa8196f22b43018d2e Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 13 Aug 2015 20:38:16 +0000 Subject: [CMake] Add experimental support for building compiler-rt for iOS Summary: This is a reunification of three separate reviews D11073, D11082, D11083. Having them separate was not constructive even though the patches were smaller because it led to fragmented conversations, and this is really all about one change. This patch incorporates feedback from samsonov, and refactors the hacky darwin code out of the root CMakeLists.txt and int config-ix.cmake. Reviewers: zaks.anna, bogner, kubabrecka, chandlerc, samsonov Subscribers: jevinskie, filcab, llvm-commits Differential Revision: http://reviews.llvm.org/D11820 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244948 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/Modules/CompilerRTUtils.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmake/Modules/CompilerRTUtils.cmake') diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake index f7f60a4ac..cf690f4a3 100644 --- a/cmake/Modules/CompilerRTUtils.cmake +++ b/cmake/Modules/CompilerRTUtils.cmake @@ -57,3 +57,13 @@ macro(append_have_file_definition filename varname list) endif() list(APPEND ${list} "${varname}=${${varname}}") endmacro() + +macro(list_union output input1 input2) + set(${output}) + foreach(it ${${input1}}) + list(FIND ${input2} ${it} index) + if( NOT (index EQUAL -1)) + list(APPEND ${output} ${it}) + endif() + endforeach() +endmacro() -- cgit v1.2.3