summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 95432e298..be5b81f05 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -31,9 +31,10 @@ endfunction()
# ARCHS <architectures>
# SOURCES <source files>
# CFLAGS <compile flags>
-# DEFS <compile definitions>)
+# DEFS <compile definitions>
+# DEPS <dependencies>)
function(add_compiler_rt_object_libraries name)
- cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS" ${ARGN})
+ cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS;DEPS" ${ARGN})
set(libnames)
if(APPLE)
foreach(os ${LIB_OS})
@@ -56,6 +57,9 @@ function(add_compiler_rt_object_libraries name)
foreach(libname ${libnames})
add_library(${libname} OBJECT ${LIB_SOURCES})
+ if(LIB_DEPS)
+ add_dependencies(${libname} ${LIB_DEPS})
+ endif()
# Strip out -msse3 if this isn't macOS.
set(target_flags ${LIB_CFLAGS})