forked from OSchip/llvm-project
[OpenMP] Disable tests if FileCheck is not available in in-tree building
FileCheck is required for OpenMP tests. The current detection can fail if building OpenMP in-tree when user sets `LLVM_INSTALL_TOOLCHAIN_ONLY=ON`. As a result, CMake will raise an error and the compilation will be broken. This patch fixed the issue. When `FileCheck` is not a target, tests will just be skipped. Reviewed By: jdoerfert, JonChesterfield Differential Revision: https://reviews.llvm.org/D95689
This commit is contained in:
parent
3ffc53ba16
commit
f0129cc35e
|
@ -57,8 +57,14 @@ if (${OPENMP_STANDALONE_BUILD})
|
|||
endif()
|
||||
set(OPENMP_LIT_ARGS "${DEFAULT_LIT_ARGS}" CACHE STRING "Options for lit.")
|
||||
separate_arguments(OPENMP_LIT_ARGS)
|
||||
else()
|
||||
if (NOT TARGET "FileCheck")
|
||||
message(STATUS "Cannot find 'FileCheck'.")
|
||||
message(WARNING "The check targets will not be available!")
|
||||
set(ENABLE_CHECK_TARGETS FALSE)
|
||||
else()
|
||||
set(OPENMP_FILECHECK_EXECUTABLE ${LLVM_RUNTIME_OUTPUT_INTDIR}/FileCheck)
|
||||
endif()
|
||||
set(OPENMP_NOT_EXECUTABLE ${LLVM_RUNTIME_OUTPUT_INTDIR}/not)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue