aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-12-24 22:43:59 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-12-24 22:43:59 +0000
commit3d662d5586d08a4adb01b8dd61301f24d9c21301 (patch)
tree211881e3119b84d2a56c5b78837e85bca3479bcc /cmake
parent71f30bffcf158ffac8c75bb67872e275b7f87e47 (diff)
[CMake] AddLLVM.cmake: Tweak the corner case that "check-all" doesn't have any tests.
"check-all" can be executed with 0 status, "check-all does nothing, no tools built." LLVM_EXTERNAL_CLANG_BUILD=OFF LLVM_BUILD_TOOLS=OFF can reproduce this. Oscar Fuentes reported this. Thank you. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/modules/AddLLVM.cmake16
1 files changed, 11 insertions, 5 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index cfb876e076..516e02357c 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -279,11 +279,17 @@ function(add_lit_target target comment)
foreach(param ${ARG_PARAMS})
list(APPEND LIT_COMMAND --param ${param})
endforeach()
- add_custom_target(${target}
- COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
- COMMENT "${comment}"
- )
- add_dependencies(${target} ${ARG_DEPENDS})
+ if( ARG_DEPENDS )
+ add_custom_target(${target}
+ COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
+ COMMENT "${comment}"
+ )
+ add_dependencies(${target} ${ARG_DEPENDS})
+ else()
+ add_custom_target(${target}
+ COMMAND cmake -E echo "${target} does nothing, no tools built.")
+ message(STATUS "${target} does nothing.")
+ endif()
endfunction()
# A function to add a set of lit test suites to be driven through 'check-*' targets.