summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
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
commit04a664e92e5b54efbda00d760c811581a0d6beff (patch)
treeebd6653598b0ff55bf547f786aaf4b3b34ab6a19 /llvm/cmake/modules
parenta5d914196caec06b902034dc8a1f8eb6fc6f3a30 (diff)
downloadbcm5719-llvm-04a664e92e5b54efbda00d760c811581a0d6beff.tar.gz
bcm5719-llvm-04a664e92e5b54efbda00d760c811581a0d6beff.zip
[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. llvm-svn: 171046
Diffstat (limited to 'llvm/cmake/modules')
-rwxr-xr-xllvm/cmake/modules/AddLLVM.cmake16
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index cfb876e0763..516e02357c9 100755
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/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.
OpenPOWER on IntegriCloud