summaryrefslogtreecommitdiffstats
path: root/third_party/aom/build/cmake/compiler_flags.cmake
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 06:04:57 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 06:04:57 -0500
commit7369c7d7a5eed32963d8af37658286617919f91c (patch)
tree5397ce7ee9bca1641118fdc3187bd9e2b24fdc9c /third_party/aom/build/cmake/compiler_flags.cmake
parent77887af9c4ad1420bbdb33984af4f74b55ca59db (diff)
downloadUXP-7369c7d7a5eed32963d8af37658286617919f91c.tar
UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.gz
UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.lz
UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.xz
UXP-7369c7d7a5eed32963d8af37658286617919f91c.zip
Update aom to commit id f5bdeac22930ff4c6b219be49c843db35970b918
Diffstat (limited to 'third_party/aom/build/cmake/compiler_flags.cmake')
-rw-r--r--third_party/aom/build/cmake/compiler_flags.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/third_party/aom/build/cmake/compiler_flags.cmake b/third_party/aom/build/cmake/compiler_flags.cmake
index c9fc69b92..ee6d12bd3 100644
--- a/third_party/aom/build/cmake/compiler_flags.cmake
+++ b/third_party/aom/build/cmake/compiler_flags.cmake
@@ -220,4 +220,25 @@ function (append_exe_linker_flag flag)
endif ()
endfunction ()
+# Adds $flag to the link flags for $target.
+function (append_link_flag_to_target target flags)
+ unset(target_link_flags)
+ get_target_property(target_link_flags ${target} LINK_FLAGS)
+
+ if (target_link_flags)
+ unset(link_flag_found)
+ string(FIND "${target_link_flags}" "${flags}" link_flag_found)
+
+ if (NOT ${link_flag_found} EQUAL -1)
+ return()
+ endif ()
+
+ set(target_link_flags "${target_link_flags} ${flags}")
+ else ()
+ set(target_link_flags "${flags}")
+ endif ()
+
+ set_target_properties(${target} PROPERTIES LINK_FLAGS ${target_link_flags})
+endfunction ()
+
endif () # AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_