-
Notifications
You must be signed in to change notification settings - Fork 17.6k
[openmp] Allow testing OpenMP without a full clang build tree #182470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -127,19 +127,23 @@ function(add_openmp_testsuite target comment) | |||||
| set_property(GLOBAL APPEND PROPERTY OPENMP_LIT_DEPENDS ${ARG_DEPENDS}) | ||||||
| endif() | ||||||
|
|
||||||
| unset(EXTRA_CHECK_DEPENDS) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
By function(foo)
set(EXTRA_CHECK_DEPENDS) # or unset(EXTRA_CHECK_DEPENDS)
message("EXTRA_CHECK_DEPENDS='${EXTRA_CHECK_DEPENDS}'")
endfunction()
set(EXTRA_CHECK_DEPENDS "Outer namespace value" CACHE STRING "Example variable")
foo()$ cmake -P unset.cmake
EXTRA_CHECK_DEPENDS='Outer namespace value'The CMake manual puts it like this:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, right, sorry, I missed the point there! Will fix. |
||||||
| if (TARGET "clang") | ||||||
| list(APPEND EXTRA_CHECK_DEPENDS clang) | ||||||
| endif() | ||||||
| if (ARG_EXCLUDE_FROM_CHECK_ALL) | ||||||
| add_lit_testsuite(${target} | ||||||
| ${comment} | ||||||
| ${ARG_UNPARSED_ARGUMENTS} | ||||||
| EXCLUDE_FROM_CHECK_ALL | ||||||
| DEPENDS clang FileCheck not ${ARG_DEPENDS} | ||||||
| DEPENDS ${EXTRA_CHECK_DEPENDS} FileCheck not ${ARG_DEPENDS} | ||||||
| ARGS ${ARG_ARGS} | ||||||
| ) | ||||||
| else() | ||||||
| add_lit_testsuite(${target} | ||||||
| ${comment} | ||||||
| ${ARG_UNPARSED_ARGUMENTS} | ||||||
| DEPENDS clang FileCheck not ${ARG_DEPENDS} | ||||||
| DEPENDS ${EXTRA_CHECK_DEPENDS} FileCheck not ${ARG_DEPENDS} | ||||||
| ARGS ${ARG_ARGS} | ||||||
| ) | ||||||
| endif() | ||||||
|
|
||||||
|
Meinersbur marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -136,8 +136,8 @@ is expected to have been built from the same Git commit as OpenMP. It will, | |||||
| however, use the compiler detected by CMake, usually gcc. | ||||||
| To also make it use Clang, add | ||||||
| `-DCMAKE_C_COMPILER=../build/bin/clang -DCMAKE_C_COMPILER=../build/bin/clang++`. | ||||||
| In any case, it will use Clang from `LLVM_BINARY_DIR` for running the regression | ||||||
| tests. `LLVM_BINARY_DIR` can also be omitted in which case testing | ||||||
| It will use Clang from `LLVM_BINARY_DIR` for running the regression tests, if Clang is included in that build. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding that you need
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| `LLVM_BINARY_DIR` can also be omitted in which case testing | ||||||
| (`ninja check-openmp`) is disabled. | ||||||
|
|
||||||
| The `CMAKE_INSTALL_PREFIX` can be the same, but does not need to. Using the same | ||||||
|
|
@@ -269,6 +269,14 @@ tests. | |||||
| : Location, relative to [`CMAKE_INSTALL_PREFIX`][CMAKE_INSTALL_PREFIX], where to | ||||||
| install the OpenMP libraries (`.a` and `.so`) | ||||||
|
|
||||||
| **OPENMP_TEST_C_COMPILER**:STRING (default: Clang built in the same build configuration, or **CMAKE_C_COMPILER**) | ||||||
| : C compiler to use for testing OpenMP runtime libraries. | ||||||
|
|
||||||
| **OPENMP_TEST_CXX_COMPILER**:STRING (default: Clang built in the same build configuration, or **CMAKE_CXX_COMPILER**) | ||||||
| : C++ compiler to use for testing OpenMP runtime libraries. | ||||||
|
|
||||||
| **OPENMP_TEST_Fortran_COMPILER**:STRING (default: Flang built in the same build configuration, or **CMAKE_Fortran_COMPILER**) | ||||||
| : Fortran compiler to use for testing OpenMP runtime libraries. | ||||||
|
|
||||||
| ### Options for `libomp` | ||||||
|
|
||||||
|
|
||||||

Uh oh!
There was an error while loading. Please reload this page.