CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
55 lines
2.0 KiB
CMake
55 lines
2.0 KiB
CMake
# CMakeLists.txt file for unit testing OpenMP host runtime library.
|
|
include(CheckFunctionExists)
|
|
include(CheckLibraryExists)
|
|
|
|
# Some tests use math functions
|
|
check_library_exists(m sqrt "" LIBOMP_HAVE_LIBM)
|
|
# When using libgcc, -latomic may be needed for atomics
|
|
# (but when using compiler-rt, the atomics will be built-in)
|
|
# Note: we can not check for __atomic_load because clang treats it
|
|
# as special built-in and that breaks CMake checks
|
|
check_function_exists(__atomic_load_1 LIBOMP_HAVE_BUILTIN_ATOMIC)
|
|
if(NOT LIBOMP_HAVE_BUILTIN_ATOMIC)
|
|
check_library_exists(atomic __atomic_load_1 "" LIBOMP_HAVE_LIBATOMIC)
|
|
else()
|
|
# not needed
|
|
set(LIBOMP_HAVE_LIBATOMIC 0)
|
|
endif()
|
|
|
|
macro(pythonize_bool var)
|
|
if (${var})
|
|
set(${var} True)
|
|
else()
|
|
set(${var} False)
|
|
endif()
|
|
endmacro()
|
|
|
|
list(APPEND OPENMP_TEST_COMPILER_FEATURE_LIST "${LIBOMP_ARCH}")
|
|
update_test_compiler_features()
|
|
|
|
pythonize_bool(LIBOMP_USE_HWLOC)
|
|
pythonize_bool(LIBOMP_OMPT_SUPPORT)
|
|
pythonize_bool(LIBOMP_OMPT_OPTIONAL)
|
|
pythonize_bool(LIBOMP_TASKGRAPH_EXPERIMENTAL)
|
|
pythonize_bool(LIBOMP_HAVE_LIBM)
|
|
pythonize_bool(LIBOMP_HAVE_LIBATOMIC)
|
|
pythonize_bool(OPENMP_TEST_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS)
|
|
|
|
add_library(ompt-print-callback INTERFACE)
|
|
target_include_directories(ompt-print-callback INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/ompt)
|
|
|
|
|
|
add_custom_target(libomp-test-depends)
|
|
add_dependencies(libomp-test-depends omp)
|
|
if (LLVM_RUNTIMES_BUILD AND OPENMP_TEST_Fortran_COMPILER AND "flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
|
|
add_dependencies(libomp-test-depends flang-rt)
|
|
endif ()
|
|
|
|
add_openmp_testsuite(check-libomp "Running libomp tests" ${CMAKE_CURRENT_BINARY_DIR} DEPENDS libomp-test-depends)
|
|
# Add target check-ompt, but make sure to not add the tests twice to check-openmp.
|
|
add_openmp_testsuite(check-ompt "Running OMPT tests" ${CMAKE_CURRENT_BINARY_DIR}/ompt EXCLUDE_FROM_CHECK_ALL DEPENDS omp)
|
|
|
|
# Configure the lit.site.cfg.in file
|
|
set(AUTO_GEN_COMMENT "## Autogenerated by libomp configuration.\n# Do not edit!")
|
|
configure_file(lit.site.cfg.in lit.site.cfg @ONLY)
|