[llvm] r286720 - [OCaml] Clear cross-target test deps when building out-of-tree
Michal Gorny via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 12 06:58:32 PST 2016
Author: mgorny
Date: Sat Nov 12 08:58:30 2016
New Revision: 286720
URL: http://llvm.org/viewvc/llvm-project?rev=286720&view=rev
Log:
[OCaml] Clear cross-target test deps when building out-of-tree
Clear cross-target test dependencies when using LLVM_OCAML_OUT_OF_TREE,
in order to make it possible to run check-llvm-bindings-ocaml without
rebuilding the whole LLVM.
Differential Revision: https://reviews.llvm.org/D26580
Modified:
llvm/trunk/test/CMakeLists.txt
Modified: llvm/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=286720&r1=286719&r2=286720&view=diff
==============================================================================
--- llvm/trunk/test/CMakeLists.txt (original)
+++ llvm/trunk/test/CMakeLists.txt Sat Nov 12 08:58:30 2016
@@ -92,7 +92,22 @@ if(TARGET LTO)
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
endif()
+if(LLVM_BUILD_EXAMPLES)
+ list(APPEND LLVM_TEST_DEPENDS
+ Kaleidoscope-Ch3
+ Kaleidoscope-Ch4
+ Kaleidoscope-Ch5
+ Kaleidoscope-Ch6
+ Kaleidoscope-Ch7
+ )
+endif()
+
if(TARGET ocaml_llvm)
+ # Clear all non-OCaml cross-target dependencies when building out-of-tree.
+ if(LLVM_OCAML_OUT_OF_TREE)
+ set(LLVM_TEST_DEPENDS)
+ endif()
+
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
ocaml_llvm
ocaml_llvm_all_backends
@@ -111,16 +126,6 @@ if(TARGET ocaml_llvm)
)
endif()
-if(LLVM_BUILD_EXAMPLES)
- list(APPEND LLVM_TEST_DEPENDS
- Kaleidoscope-Ch3
- Kaleidoscope-Ch4
- Kaleidoscope-Ch5
- Kaleidoscope-Ch6
- Kaleidoscope-Ch7
- )
-endif()
-
add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
More information about the llvm-commits
mailing list