[libclc][CMake] Check SOURCES and LIBRARIES arguments are not empty (#186542)
This commit is contained in:
parent
c31ffbfcd3
commit
8175bd92ea
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user