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 | 5cb786012955c9bacc68fbad993d871abf8e087f (patch) | |
tree | 13f508b2ff26e5833dea1ec09827ffca9bf91754 /compiler-rt/cmake | |
parent | 08bf4fd345db86218dea3412b6fdb5463d9248ad (diff) | |
download | bcm5719-llvm-5cb786012955c9bacc68fbad993d871abf8e087f.tar.gz bcm5719-llvm-5cb786012955c9bacc68fbad993d871abf8e087f.zip |
[CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with -stdlib=libc++
llvm-svn: 174699
Diffstat (limited to 'compiler-rt/cmake')
-rw-r--r-- | compiler-rt/cmake/Modules/CompilerRTUtils.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake index 50f068091e6..f9760f40dbd 100644 --- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +++ b/compiler-rt/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() |