diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index 2b8ff956d4a8..479a68865ad3 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -82,6 +82,9 @@ function(link_libclc_builtin_library target_name) if(NOT ARG_OUTPUT_FILENAME) message(FATAL_ERROR "OUTPUT_FILENAME is required for link_libclc_builtin_library") endif() + if(NOT ARG_LIBRARIES) + message(FATAL_ERROR "LIBRARIES is required for link_libclc_builtin_library") + endif() set(library_dir ${LIBCLC_OUTPUT_LIBRARY_DIR}/${ARG_TRIPLE}) file(MAKE_DIRECTORY ${library_dir}) @@ -160,6 +163,9 @@ function(add_libclc_library target_name) if(NOT ARG_PARENT_TARGET) message(FATAL_ERROR "PARENT_TARGET is required for add_libclc_library") endif() + if(NOT ARG_SOURCES) + message(FATAL_ERROR "SOURCES is required for add_libclc_library") + endif() set(opencl_lib ${target_name}_opencl_builtins) add_libclc_builtin_library(${opencl_lib}