[Offload] Add CMake alias for CI (#186099)

In the pre-merge CI we need a top-level visible target that can be used
to build offload, i.e., libomptarget and LLVMOffload.

The related PR to include offload into pre-merge CI is here:
https://github.com/llvm/llvm-project/pull/174955
This commit is contained in:
Jan Patrick Lehr 2026-03-18 15:46:08 +01:00 committed by GitHub
parent b85cf95aad
commit 7a2193cd19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -403,3 +403,16 @@ if(OFFLOAD_INCLUDE_TESTS)
add_subdirectory(test)
add_subdirectory(unittests)
endif()
# Expose a high-level target to build the offloading runtimes.
# This is used in pre-commit CI to run a build of the libraries without requiring
# to invoke the check-* targets.
add_custom_target(offload
COMMENT "Building offloading runtime libraries and plugins"
)
if(TARGET omptarget)
add_dependencies(offload omptarget)
endif()
if(TARGET LLVMOffload)
add_dependencies(offload LLVMOffload)
endif()