Skip to content

[OpenMP] Add OPENMP_INCLUDE_TESTS #143390

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions openmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ else()
set(OPENMP_STANDALONE_BUILD FALSE)
endif()

option(OPENMP_INCLUDE_TESTS "Generate and build openmp tests." ${LLVM_INCLUDE_TESTS})

# Must go below project(..)
include(GNUInstallDirs)

Expand Down Expand Up @@ -93,7 +95,9 @@ include(config-ix)
include(HandleOpenMPOptions)

# Set up testing infrastructure.
include(OpenMPTesting)
if(OPENMP_INCLUDE_TESTS)
include(OpenMPTesting)
endif()

set(OPENMP_TEST_FLAGS "" CACHE STRING
"Extra compiler flags to send to the test compiler.")
Expand Down Expand Up @@ -153,4 +157,6 @@ add_subdirectory(libompd)
add_subdirectory(docs)

# Now that we have seen all testsuites, create the check-openmp target.
construct_check_openmp_target()
if(OPENMP_INCLUDE_TESTS)
construct_check_openmp_target()
endif()
8 changes: 4 additions & 4 deletions openmp/libompd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if(LIBOMP_OMPD_SUPPORT)
add_subdirectory(src)
if(LIBOMP_OMPD_GDB_SUPPORT)
add_subdirectory(gdb-plugin)
# GDB is required to run the tests
if (GDB_FOUND)
add_subdirectory(test)
endif()
# GDB is required to run the tests
if (GDB_FOUND AND OPENMP_INCLUDE_TESTS)
add_subdirectory(test)
endif()
endif()
endif()
4 changes: 3 additions & 1 deletion openmp/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ if(${OPENMP_STANDALONE_BUILD})
endif()

add_subdirectory(src)
add_subdirectory(test)
if(OPENMP_INCLUDE_TESTS)
add_subdirectory(test)
endif()

# make these variables available for tools:
set(LIBOMP_LIBRARY_DIR ${LIBOMP_LIBRARY_DIR} PARENT_SCOPE)
Expand Down
4 changes: 3 additions & 1 deletion openmp/tools/archer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ if(LIBOMP_OMPT_SUPPORT AND LIBOMP_ARCHER_SUPPORT)
LIBRARY DESTINATION ${OPENMP_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${OPENMP_INSTALL_LIBDIR})

add_subdirectory(tests)
if(OPENMP_INCLUDE_TESTS)
add_subdirectory(tests)
endif()
endif()
4 changes: 3 additions & 1 deletion openmp/tools/multiplex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ if(LIBOMP_OMPT_SUPPORT)

install(FILES ompt-multiplex.h DESTINATION "${LIBOMP_HEADERS_INSTALL_PATH}")

add_subdirectory(tests)
if(OPENMP_INCLUDE_TESTS)
add_subdirectory(tests)
endif()
endif()
Loading