From: NAKAMURA Takumi Date: Thu, 11 Nov 2010 04:09:35 +0000 (+0000) Subject: CMake: Add the new option "LLVM_LIT_ARGS". X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e7ae70b137f9944da30494a45dc660fa60b80b66;p=oota-llvm.git CMake: Add the new option "LLVM_LIT_ARGS". Defaults: if (MSVC OR XCODE): "-sv --no-progress-bar" else: "-sv" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118776 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c2a9430c9a8..a028edf7747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,13 @@ set(C_INCLUDE_DIRS "" CACHE STRING set(LLVM_TARGET_ARCH "host" CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.") +set(LIT_ARGS_DEFAULT "-sv") +if (MSVC OR XCODE) + set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar") +endif() +set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" + CACHE STRING "Default options for lit") + option(LLVM_ENABLE_THREADS "Use threads if available." ON) if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) diff --git a/docs/CMake.html b/docs/CMake.html index 2f2af24f6f4..e2dac2e314d 100644 --- a/docs/CMake.html +++ b/docs/CMake.html @@ -325,6 +325,13 @@
Full path to a native TableGen executable (usually named tblgen). This is intented for cross-compiling: if the user sets this variable, no native TableGen will be created.
+ +
LLVM_LIT_ARGS:STRING
+
Arguments given to lit. + make check and make clang-test are affected. + By default, "-sv --no-progress-bar" + on Visual C++ and Xcode, + "-sv" on others.
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 38280573311..5a8678be2b2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,6 +24,9 @@ endif() include(FindPythonInterp) if(PYTHONINTERP_FOUND) + set(LIT_ARGS "${LLVM_LIT_ARGS}") + separate_arguments(LIT_ARGS) + get_directory_property(DEFINITIONS COMPILE_DEFINITIONS) foreach(DEF ${DEFINITIONS}) set(DEFS "${DEFS} -D${DEF}") @@ -78,7 +81,7 @@ if(PYTHONINTERP_FOUND) ${LLVM_SOURCE_DIR}/utils/lit/lit.py --param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg --param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg - -sv + ${LIT_ARGS} ${CMAKE_CURRENT_BINARY_DIR} DEPENDS COMMENT "Running LLVM regression tests")