summaryrefslogtreecommitdiff
path: root/cmake/Modules/CompilerRTUtils.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r--cmake/Modules/CompilerRTUtils.cmake10
1 files changed, 10 insertions, 0 deletions
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()