1 include(LLVMParseArguments)
2 include(LLVMProcessSources)
5 function(llvm_update_compile_flags name)
6 get_property(sources TARGET ${name} PROPERTY SOURCES)
7 if("${sources}" MATCHES "\\.c(;|$)")
8 set(update_src_props ON)
12 set(LLVM_REQUIRES_RTTI ON)
14 if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
15 set(target_compile_flags "${target_compile_flags} -fno-exceptions")
17 list(APPEND LLVM_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0)
18 set(target_compile_flags "${target_compile_flags} /EHs-c-")
22 if(NOT LLVM_REQUIRES_RTTI)
23 list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
24 if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
25 set(target_compile_flags "${target_compile_flags} -fno-rtti")
27 set(target_compile_flags "${target_compile_flags} /GR-")
32 foreach(fn ${sources})
33 get_filename_component(suf ${fn} EXT)
34 if("${suf}" STREQUAL ".cpp")
35 set_property(SOURCE ${fn} APPEND_STRING PROPERTY
36 COMPILE_FLAGS "${target_compile_flags}")
40 # Update target props, since all sources are C++.
41 set_property(TARGET ${name} APPEND_STRING PROPERTY
42 COMPILE_FLAGS "${target_compile_flags}")
45 set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS ${LLVM_COMPILE_DEFINITIONS})
48 function(add_llvm_symbol_exports target_name export_file)
49 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
50 set(native_export_file "${target_name}.exports")
51 add_custom_command(OUTPUT ${native_export_file}
52 COMMAND sed -e "s/^/_/" < ${export_file} > ${native_export_file}
53 DEPENDS ${export_file}
55 COMMENT "Creating export file for ${target_name}")
56 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
57 LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
58 elseif(LLVM_HAVE_LINK_VERSION_SCRIPT)
59 # Gold and BFD ld require a version script rather than a plain list.
60 set(native_export_file "${target_name}.exports")
61 # FIXME: Don't write the "local:" line on OpenBSD.
62 add_custom_command(OUTPUT ${native_export_file}
63 COMMAND echo "{" > ${native_export_file}
64 COMMAND grep -q "[[:alnum:]]" ${export_file} && echo " global:" >> ${native_export_file} || :
65 COMMAND sed -e "s/$/;/" -e "s/^/ /" < ${export_file} >> ${native_export_file}
66 COMMAND echo " local: *;" >> ${native_export_file}
67 COMMAND echo "};" >> ${native_export_file}
68 DEPENDS ${export_file}
70 COMMENT "Creating export file for ${target_name}")
71 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
72 LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
74 set(native_export_file "${target_name}.def")
81 # Using ${export_file} in add_custom_command directly confuses cmd.exe.
82 file(TO_NATIVE_PATH ${export_file} export_file_backslashes)
84 add_custom_command(OUTPUT ${native_export_file}
85 COMMAND ${CMAKE_COMMAND} -E echo "EXPORTS" > ${native_export_file}
86 COMMAND ${CAT} ${export_file_backslashes} >> ${native_export_file}
87 DEPENDS ${export_file}
89 COMMENT "Creating export file for ${target_name}")
91 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
92 LINK_FLAGS " ${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
94 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
95 LINK_FLAGS " /DEF:${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
99 add_custom_target(${target_name}_exports DEPENDS ${native_export_file})
100 set_target_properties(${target_name}_exports PROPERTIES FOLDER "Misc")
102 get_property(srcs TARGET ${target_name} PROPERTY SOURCES)
104 get_filename_component(extension ${src} EXT)
105 if(extension STREQUAL ".cpp")
106 set(first_source_file ${src})
111 # Force re-linking when the exports file changes. Actually, it
112 # forces recompilation of the source file. The LINK_DEPENDS target
113 # property only works for makefile-based generators.
114 # FIXME: This is not safe because this will create the same target
115 # ${native_export_file} in several different file:
116 # - One where we emitted ${target_name}_exports
117 # - One where we emitted the build command for the following object.
118 # set_property(SOURCE ${first_source_file} APPEND PROPERTY
119 # OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${native_export_file})
121 set_property(DIRECTORY APPEND
122 PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${native_export_file})
124 add_dependencies(${target_name} ${target_name}_exports)
125 endfunction(add_llvm_symbol_exports)
127 function(add_dead_strip target_name)
128 if(NOT LLVM_NO_DEAD_STRIP)
129 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
130 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
131 LINK_FLAGS " -Wl,-dead_strip")
133 # Object files are compiled with -ffunction-data-sections.
134 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
135 LINK_FLAGS " -Wl,--gc-sections")
138 endfunction(add_dead_strip)
140 # Set each output directory according to ${CMAKE_CONFIGURATION_TYPES}.
141 # Note: Don't set variables CMAKE_*_OUTPUT_DIRECTORY any more,
142 # or a certain builder, for eaxample, msbuild.exe, would be confused.
143 function(set_output_directory target bindir libdir)
144 if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
145 foreach(build_mode ${CMAKE_CONFIGURATION_TYPES})
146 string(TOUPPER "${build_mode}" CONFIG_SUFFIX)
147 string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} bi ${bindir})
148 string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} li ${libdir})
149 set_target_properties(${target} PROPERTIES "RUNTIME_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${bi})
150 set_target_properties(${target} PROPERTIES "ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${li})
151 set_target_properties(${target} PROPERTIES "LIBRARY_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${li})
154 set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${bindir})
155 set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${libdir})
156 set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${libdir})
160 macro(add_llvm_library name)
161 llvm_process_sources( ALL_FILES ${ARGN} )
162 add_library( ${name} ${ALL_FILES} )
163 set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
164 set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
165 llvm_update_compile_flags(${name})
166 add_dead_strip( ${name} )
167 if( LLVM_COMMON_DEPENDS )
168 add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
169 endif( LLVM_COMMON_DEPENDS )
171 if( BUILD_SHARED_LIBS )
172 llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
174 set_target_properties(${name}
176 IMPORT_SUFFIX ".imp")
179 if (LLVM_EXPORTED_SYMBOL_FILE)
180 add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
184 # Ensure that the system libraries always comes last on the
185 # list. Without this, linking the unit tests on MinGW fails.
186 link_system_libs( ${name} )
188 if( EXCLUDE_FROM_ALL )
189 set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
191 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO")
192 install(TARGETS ${name}
193 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
194 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
197 set_target_properties(${name} PROPERTIES FOLDER "Libraries")
199 # Add the explicit dependency information for this library.
201 # It would be nice to verify that we have the dependencies for this library
202 # name, but using get_property(... SET) doesn't suffice to determine if a
203 # property has been set to an empty value.
204 get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
205 target_link_libraries(${name} ${lib_deps})
206 endmacro(add_llvm_library name)
208 macro(add_llvm_loadable_module name)
209 if( NOT LLVM_ON_UNIX OR CYGWIN )
210 message(STATUS "Loadable modules not supported on this platform.
212 # Add empty "phony" target
213 add_custom_target(${name})
215 llvm_process_sources( ALL_FILES ${ARGN} )
222 add_library( ${name} ${libkind} ${ALL_FILES} )
223 set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
224 set_target_properties( ${name} PROPERTIES PREFIX "" )
225 llvm_update_compile_flags(${name})
226 add_dead_strip( ${name} )
228 if (LLVM_EXPORTED_SYMBOL_FILE)
229 add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
230 endif(LLVM_EXPORTED_SYMBOL_FILE)
232 llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
233 link_system_libs( ${name} )
236 # Darwin-specific linker flags for loadable modules.
237 set_property(TARGET ${name} APPEND_STRING PROPERTY
238 LINK_FLAGS " -Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
242 set_property(TARGET ${name} PROPERTY SUFFIX ${LLVM_PLUGIN_EXT})
245 if( EXCLUDE_FROM_ALL )
246 set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
248 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
249 install(TARGETS ${name}
250 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
251 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
256 set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
257 endmacro(add_llvm_loadable_module name)
260 macro(add_llvm_executable name)
261 llvm_process_sources( ALL_FILES ${ARGN} )
262 if( EXCLUDE_FROM_ALL )
263 add_executable(${name} EXCLUDE_FROM_ALL ${ALL_FILES})
265 add_executable(${name} ${ALL_FILES})
267 llvm_update_compile_flags(${name})
268 add_dead_strip( ${name} )
270 if (LLVM_EXPORTED_SYMBOL_FILE)
271 add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
272 endif(LLVM_EXPORTED_SYMBOL_FILE)
274 set(EXCLUDE_FROM_ALL OFF)
275 set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
276 llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
277 if( LLVM_COMMON_DEPENDS )
278 add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
279 endif( LLVM_COMMON_DEPENDS )
280 link_system_libs( ${name} )
281 endmacro(add_llvm_executable name)
284 set (LLVM_TOOLCHAIN_TOOLS
289 macro(add_llvm_tool name)
290 if( NOT LLVM_BUILD_TOOLS )
291 set(EXCLUDE_FROM_ALL ON)
293 add_llvm_executable(${name} ${ARGN})
295 list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
296 if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
297 if( LLVM_BUILD_TOOLS )
298 install(TARGETS ${name} RUNTIME DESTINATION bin)
301 set_target_properties(${name} PROPERTIES FOLDER "Tools")
302 endmacro(add_llvm_tool name)
305 macro(add_llvm_example name)
306 if( NOT LLVM_BUILD_EXAMPLES )
307 set(EXCLUDE_FROM_ALL ON)
309 add_llvm_executable(${name} ${ARGN})
310 if( LLVM_BUILD_EXAMPLES )
311 install(TARGETS ${name} RUNTIME DESTINATION examples)
313 set_target_properties(${name} PROPERTIES FOLDER "Examples")
314 endmacro(add_llvm_example name)
317 macro(add_llvm_utility name)
318 add_llvm_executable(${name} ${ARGN})
319 set_target_properties(${name} PROPERTIES FOLDER "Utils")
320 endmacro(add_llvm_utility name)
323 macro(add_llvm_target target_name)
324 include_directories(BEFORE
325 ${CMAKE_CURRENT_BINARY_DIR}
326 ${CMAKE_CURRENT_SOURCE_DIR})
327 add_llvm_library(LLVM${target_name} ${ARGN} ${TABLEGEN_OUTPUT})
328 set( CURRENT_LLVM_TARGET LLVM${target_name} )
329 endmacro(add_llvm_target)
331 # Add external project that may want to be built as part of llvm such as Clang,
332 # lld, and Polly. This adds two options. One for the source directory of the
333 # project, which defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}. Another to
334 # enable or disable building it with everything else.
335 # Additional parameter can be specified as the name of directory.
336 macro(add_llvm_external_project name)
337 set(add_llvm_external_dir "${ARGN}")
338 if("${add_llvm_external_dir}" STREQUAL "")
339 set(add_llvm_external_dir ${name})
341 list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")
342 string(REPLACE "-" "_" nameUNDERSCORE ${name})
343 string(TOUPPER ${nameUNDERSCORE} nameUPPER)
344 set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}"
345 CACHE PATH "Path to ${name} source directory")
346 if (NOT ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} STREQUAL ""
347 AND EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt)
348 option(LLVM_EXTERNAL_${nameUPPER}_BUILD
349 "Whether to build ${name} as part of LLVM" ON)
350 if (LLVM_EXTERNAL_${nameUPPER}_BUILD)
351 add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${add_llvm_external_dir})
354 endmacro(add_llvm_external_project)
356 macro(add_llvm_tool_subdirectory name)
357 list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}")
358 add_subdirectory(${name})
359 endmacro(add_llvm_tool_subdirectory)
361 macro(ignore_llvm_tool_subdirectory name)
362 list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}")
363 endmacro(ignore_llvm_tool_subdirectory)
365 function(add_llvm_implicit_external_projects)
366 set(list_of_implicit_subdirs "")
367 file(GLOB sub-dirs "${CMAKE_CURRENT_SOURCE_DIR}/*")
368 foreach(dir ${sub-dirs})
369 if(IS_DIRECTORY "${dir}")
370 list(FIND LLVM_IMPLICIT_PROJECT_IGNORE "${dir}" tool_subdir_ignore)
371 if( tool_subdir_ignore EQUAL -1
372 AND EXISTS "${dir}/CMakeLists.txt")
373 get_filename_component(fn "${dir}" NAME)
374 list(APPEND list_of_implicit_subdirs "${fn}")
379 foreach(external_proj ${list_of_implicit_subdirs})
380 add_llvm_external_project("${external_proj}")
382 endfunction(add_llvm_implicit_external_projects)
384 # Generic support for adding a unittest.
385 function(add_unittest test_suite test_name)
386 if( NOT LLVM_BUILD_TESTS )
387 set(EXCLUDE_FROM_ALL ON)
390 # Visual Studio 2012 only supports up to 8 template parameters in
391 # std::tr1::tuple by default, but gtest requires 10
392 if (MSVC AND MSVC_VERSION EQUAL 1700)
393 list(APPEND LLVM_COMPILE_DEFINITIONS _VARIADIC_MAX=10)
396 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
397 if (NOT LLVM_ENABLE_THREADS)
398 list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0)
401 if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
402 set(LLVM_COMPILE_FLAGS "-Wno-variadic-macros")
405 set(LLVM_REQUIRES_RTTI OFF)
407 add_llvm_executable(${test_name} ${ARGN})
408 set(outdir ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
409 set_output_directory(${test_name} ${outdir} ${outdir})
410 target_link_libraries(${test_name}
413 LLVMSupport # gtest needs it for raw_ostream.
416 add_dependencies(${test_suite} ${test_name})
417 get_target_property(test_suite_folder ${test_suite} FOLDER)
418 if (NOT ${test_suite_folder} STREQUAL "NOTFOUND")
419 set_property(TARGET ${test_name} PROPERTY FOLDER "${test_suite_folder}")
423 # This function provides an automatic way to 'configure'-like generate a file
424 # based on a set of common and custom variables, specifically targeting the
425 # variables needed for the 'lit.site.cfg' files. This function bundles the
426 # common variables that any Lit instance is likely to need, and custom
427 # variables can be passed in.
428 function(configure_lit_site_cfg input output)
429 foreach(c ${LLVM_TARGETS_TO_BUILD})
430 set(TARGETS_BUILT "${TARGETS_BUILT} ${c}")
432 set(TARGETS_TO_BUILD ${TARGETS_BUILT})
434 set(SHLIBEXT "${LTDL_SHLIB_EXT}")
436 if(BUILD_SHARED_LIBS)
437 set(LLVM_SHARED_LIBS_ENABLED "1")
439 set(LLVM_SHARED_LIBS_ENABLED "0")
440 endif(BUILD_SHARED_LIBS)
442 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
443 set(SHLIBPATH_VAR "DYLD_LIBRARY_PATH")
444 else() # Default for all other unix like systems.
445 # CMake hardcodes the library locaction using rpath.
446 # Therefore LD_LIBRARY_PATH is not required to run binaries in the
447 # build dir. We pass it anyways.
448 set(SHLIBPATH_VAR "LD_LIBRARY_PATH")
451 # Configuration-time: See Unit/lit.site.cfg.in
452 if (CMAKE_CFG_INTDIR STREQUAL ".")
453 set(LLVM_BUILD_MODE ".")
455 set(LLVM_BUILD_MODE "%(build_mode)s")
458 # They below might not be the build tree but provided binary tree.
459 set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
460 set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR})
461 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLVM_TOOLS_DIR ${LLVM_TOOLS_BINARY_DIR})
462 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLVM_LIBS_DIR ${LLVM_LIBRARY_DIR})
464 # SHLIBDIR points the build tree.
465 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} SHLIBDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
467 set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
468 set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
469 set(SHLIBPATH_VAR ${SHLIBPATH_VAR})
471 if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE)
472 set(ENABLE_ASSERTIONS "1")
474 set(ENABLE_ASSERTIONS "0")
477 set(HOST_OS ${CMAKE_SYSTEM_NAME})
478 set(HOST_ARCH ${CMAKE_SYSTEM_PROCESSOR})
480 if (CLANG_ENABLE_ARCMT)
481 set(ENABLE_CLANG_ARCMT "1")
483 set(ENABLE_CLANG_ARCMT "0")
485 if (CLANG_ENABLE_REWRITER)
486 set(ENABLE_CLANG_REWRITER "1")
488 set(ENABLE_CLANG_REWRITER "0")
490 if (CLANG_ENABLE_STATIC_ANALYZER)
491 set(ENABLE_CLANG_STATIC_ANALYZER "1")
493 set(ENABLE_CLANG_STATIC_ANALYZER "0")
496 configure_file(${input} ${output} @ONLY)
499 # A raw function to create a lit target. This is used to implement the testuite
500 # management functions.
501 function(add_lit_target target comment)
502 parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
503 set(LIT_ARGS "${ARG_ARGS} ${LLVM_LIT_ARGS}")
504 separate_arguments(LIT_ARGS)
505 if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
506 list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
510 ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py
513 foreach(param ${ARG_PARAMS})
514 list(APPEND LIT_COMMAND --param ${param})
517 add_custom_target(${target}
518 COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
521 add_dependencies(${target} ${ARG_DEPENDS})
523 add_custom_target(${target}
524 COMMAND ${CMAKE_COMMAND} -E echo "${target} does nothing, no tools built.")
525 message(STATUS "${target} does nothing.")
528 # Tests should be excluded from "Build Solution".
529 set_target_properties(${target} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON)
532 # A function to add a set of lit test suites to be driven through 'check-*' targets.
533 function(add_lit_testsuite target comment)
534 parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
536 # EXCLUDE_FROM_ALL excludes the test ${target} out of check-all.
537 if(NOT EXCLUDE_FROM_ALL)
538 # Register the testsuites, params and depends for the global check rule.
539 set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${ARG_DEFAULT_ARGS})
540 set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${ARG_PARAMS})
541 set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS ${ARG_DEPENDS})
542 set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${ARG_ARGS})
545 # Produce a specific suffixed check rule.
546 add_lit_target(${target} ${comment}
549 DEPENDS ${ARG_DEPENDS}