Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

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 @@ -13,8 +13,10 @@ list(INSERT CMAKE_MODULE_PATH 0
if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(OPENMP_STANDALONE_BUILD TRUE)
project(openmp C CXX ASM)
option(OPENMP_INCLUDE_TESTS "Generate and build openmp tests." ON)
else()
set(OPENMP_STANDALONE_BUILD FALSE)
option(OPENMP_INCLUDE_TESTS "Generate and build openmp tests." ${LLVM_INCLUDE_TESTS})
endif()

# Must go below project(..)
Expand Down Expand Up @@ -104,7 +106,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 @@ -164,4 +168,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()
4 changes: 4 additions & 0 deletions openmp/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ Options for all Libraries
Compiler to use for testing. Defaults to the compiler that was also used for
building. Will default to flang if build is in-tree.

**OPENMP_INCLUDE_TESTS** = ``${LLVM_INCLUDE_TESTS}``
Enable generation and build of test suite. Defaults to ``LLVM_INCLUDE_TESTS``
if built as part of LLVM, otherwise defaults to ``ON``.

**OPENMP_LLVM_TOOLS_DIR** = ``/path/to/built/llvm/tools``
Additional path to search for LLVM tools needed by tests.

Expand Down
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 @@ -34,5 +34,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