summaryrefslogtreecommitdiff
path: root/openmp/cmake
diff options
context:
space:
mode:
authorShilei Tian <tianshilei1992@gmail.com>2021-01-10 16:46:09 -0500
committerShilei Tian <tianshilei1992@gmail.com>2021-01-10 16:46:19 -0500
commit7be3285248bf54d0784a76174cf44cf7c1e780a5 (patch)
tree198a9b91569d4908da284980996cc43a8dfb37e1 /openmp/cmake
parent894d2dbf502026a2b063340f8214b8ffd7cf7e21 (diff)
downloadllvm-7be3285248bf54d0784a76174cf44cf7c1e780a5.tar.gz
[OpenMP] Not set OPENMP_STANDALONE_BUILD=ON when building OpenMP along with LLVM
For now, `*_STANDALONE_BUILD` is set to ON even if they're built along with LLVM because of issues mentioned in the comments. This can cause some issues. For example, if we build OpenMP along with LLVM, we'd like to copy those OpenMP headers to `<prefix>/lib/clang/<version>/include` such that `clang` can find those headers without using `-I <prefix>/include` because those headers will be copied to `<prefix>/include` if it is built standalone. In this patch, we fixed the dependence issue in OpenMP such that it can be built correctly even with `OPENMP_STANDALONE_BUILD=OFF`. The issue is in the call to `add_lit_testsuite`, where `clang` and `clang-resource-headers` are passed as `DEPENDS`. Since we're building OpenMP along with LLVM, `clang` is set by CMake to be the C/C++ compiler, therefore these two dependences are no longer needed, where caused the dependence issue. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D93738
Diffstat (limited to 'openmp/cmake')
-rw-r--r--openmp/cmake/OpenMPTesting.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake
index 1d46b141ffdf..7290bc48969f 100644
--- a/openmp/cmake/OpenMPTesting.cmake
+++ b/openmp/cmake/OpenMPTesting.cmake
@@ -190,14 +190,14 @@ function(add_openmp_testsuite target comment)
${comment}
${ARG_UNPARSED_ARGUMENTS}
EXCLUDE_FROM_CHECK_ALL
- DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
+ DEPENDS clang FileCheck ${ARG_DEPENDS}
ARGS ${ARG_ARGS}
)
else()
add_lit_testsuite(${target}
${comment}
${ARG_UNPARSED_ARGUMENTS}
- DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
+ DEPENDS clang FileCheck ${ARG_DEPENDS}
ARGS ${ARG_ARGS}
)
endif()