diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-02-08 07:39:25 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-02-08 07:39:25 +0000 |
commit | 304026d0c9aa51068fe36042243fbdd1c507619c (patch) | |
tree | 0b5a7f8f1e99c4fc9254b08bf5b76ccadf47f885 /cmake/Modules | |
parent | e47115fa033f3e3bd906dabe8beebc2e29e722d0 (diff) | |
download | compiler-rt-304026d0c9aa51068fe36042243fbdd1c507619c.tar.gz |
[CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with -stdlib=libc++
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/CompilerRTUtils.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake index 50f068091..f9760f40d 100644 --- a/cmake/Modules/CompilerRTUtils.cmake +++ b/cmake/Modules/CompilerRTUtils.cmake @@ -15,3 +15,14 @@ function(set_target_link_flags target) set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") endfunction() +# Check if a given flag is present in a space-separated flag_string. +# Store the result in out_var. +function(find_flag_in_string flag_string flag out_var) + string(REPLACE " " ";" flag_list ${flag_string}) + list(FIND flag_list ${flag} flag_pos) + if(NOT flag_pos EQUAL -1) + set(${out_var} TRUE PARENT_SCOPE) + else() + set(${out_var} FALSE PARENT_SCOPE) + endif() +endfunction() |