aboutsummaryrefslogtreecommitdiff
path: root/libclc/cmake/modules/AddLibclc.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'libclc/cmake/modules/AddLibclc.cmake')
-rw-r--r--libclc/cmake/modules/AddLibclc.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake
index dc4b1e8..9b0e5d9 100644
--- a/libclc/cmake/modules/AddLibclc.cmake
+++ b/libclc/cmake/modules/AddLibclc.cmake
@@ -207,6 +207,8 @@ endfunction()
# libclc architecture/triple suffix
# * TRIPLE <string>
# Triple used to compile
+# * PARENT_TARGET <string>
+# Target into which to group the target builtins
#
# Optional Arguments:
# * CLC_INTERNAL
@@ -229,7 +231,7 @@ endfunction()
function(add_libclc_builtin_set)
cmake_parse_arguments(ARG
"CLC_INTERNAL"
- "ARCH;TRIPLE;ARCH_SUFFIX"
+ "ARCH;TRIPLE;ARCH_SUFFIX;PARENT_TARGET"
"LIB_FILES;GEN_FILES;COMPILE_FLAGS;OPT_FLAGS;ALIASES;INTERNAL_LINK_DEPENDENCIES"
${ARGN}
)
@@ -403,6 +405,9 @@ function(add_libclc_builtin_set)
add_custom_target( prepare-${ARG_TRIPLE} ALL )
endif()
add_dependencies( prepare-${ARG_TRIPLE} prepare-${obj_suffix} )
+ # Add dependency to top-level pseudo target to ease making other
+ # targets dependent on libclc.
+ add_dependencies( ${ARG_PARENT_TARGET} prepare-${ARG_TRIPLE} )
install(
FILES ${libclc_builtins_lib}
@@ -445,6 +450,7 @@ function(add_libclc_builtin_set)
add_custom_target( alias-${alias_suffix} ALL
DEPENDS ${LIBCLC_OUTPUT_LIBRARY_DIR}/${alias_suffix}
)
+ add_dependencies( ${ARG_PARENT_TARGET} alias-${alias_suffix} )
set_target_properties( alias-${alias_suffix}
PROPERTIES FOLDER "libclc/Device IR/Aliases"
)