Skip to content

Commit

Permalink
[Libomptarget] Do not run CPU tests if FFI was not found
Browse files Browse the repository at this point in the history
Summary:
The previous behaviour before I made it dynamically open libFFI was that
these tests would be ignored if FFI was not found. This now allows tests
to be run without the dependency and thus the tests fails on some
buildbots. This simply makesit not build the tests if it's not present.
  • Loading branch information
jhuber6 committed Jan 10, 2024
1 parent 5c0b3a0 commit d65a7d1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions openmp/libomptarget/plugins-nextgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,16 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tmachine}$")
target_include_directories("omptarget.rtl.${tmachine_libname}" PRIVATE
${LIBOMPTARGET_INCLUDE_DIR})

list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.${tmachine_libname}")
set(LIBOMPTARGET_TESTED_PLUGINS
"${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)
set(LIBOMPTARGET_SYSTEM_TARGETS
"${LIBOMPTARGET_SYSTEM_TARGETS} ${tmachine_triple} ${tmachine_triple}-LTO" PARENT_SCOPE)
if(LIBOMPTARGET_DEP_LIBFFI_FOUND)
list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.${tmachine_libname}")
set(LIBOMPTARGET_TESTED_PLUGINS
"${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)
set(LIBOMPTARGET_SYSTEM_TARGETS
"${LIBOMPTARGET_SYSTEM_TARGETS} ${tmachine_triple}
${tmachine_triple}-LTO" PARENT_SCOPE)
else()
libomptarget_say("Not generating ${tmachine_name} tests. LibFFI not found.")
endif()
else()
libomptarget_say("Not building ${tmachine_name} NextGen offloading plugin: machine not found in the system.")
endif()
Expand Down

0 comments on commit d65a7d1

Please sign in to comment.