summaryrefslogtreecommitdiff
path: root/runtimes/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-08-26 20:08:57 +0000
committerChris Bieneman <beanz@apple.com>2016-08-26 20:08:57 +0000
commit7921d700748b8b80c33f03c81f917b36a98cbb66 (patch)
treeceb4afd22ffad7aad934f067f1f0bbe10c5f4aec /runtimes/CMakeLists.txt
parentceaef9f87f968fd8963305248034860b6fbcc8de (diff)
[CMake] Fixing LLVM_INCLUDE_TESTS for runtimes directory
We need to explicitly pass LLVM_INCLUDE_TESTS through from the top-level to the runtimes configuration because it isn't in LLVMConfig.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtimes/CMakeLists.txt')
-rw-r--r--runtimes/CMakeLists.txt15
1 files changed, 10 insertions, 5 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index f4d720120ff..789a93c7e1f 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -86,7 +86,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
DEPENDS ${RUNTIMES_LIT_DEPENDS}
ARGS ${RUNTIMES_LIT_EXTRA_ARGS}
)
- add_custom_target(test-depends-runtimes DEPENDS ${RUNTIMES_LIT_DEPENDS})
+ add_custom_target(runtimes-test-depends DEPENDS ${RUNTIMES_LIT_DEPENDS})
endif()
get_property(SUB_COMPONENTS GLOBAL PROPERTY SUB_COMPONENTS)
@@ -151,6 +151,10 @@ else() # if this is included from LLVM's CMake
check-${runtime_name})
endforeach()
+ if(LLVM_INCLUDE_TESTS)
+ set(test_targets runtimes-test-depends check-runtimes)
+ endif()
+
# Create a runtimes target that uses this file as its top-level CMake file.
# The runtimes target is a configuration of all the runtime libraries
# together in a single CMake invocaiton.
@@ -159,14 +163,15 @@ else() # if this is included from LLVM's CMake
DEPENDS ${deps}
# Builtins were built separately above
CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
+ -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
PASSTHROUGH_PREFIXES ${prefixes}
EXTRA_TARGETS ${extra_targets}
- test-depends-runtimes
- check-runtimes
+ ${test_targets}
${SUB_COMPONENTS}
${SUB_INSTALL_TARGETS}
USE_TOOLCHAIN)
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS test-depends-runtimes)
-
+ if(LLVM_INCLUDE_TESTS)
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS runtimes-test-depends)
+ endif()
endif()
endif()