Files
llvm/orc-rt/cmake/OrcRTTesting.cmake
Lang Hames ee7a6a45bd [ORC-RT] Initial check-in for a new, top-level ORC runtime project. (#113499)
Includes CMake files and placeholder header, library, test tool, regression
test and unit test.

The aim for this project is to create a replacement for the existing ORC
Runtime that currently resides in `llvm-project/compiler-rt/lib/orc`. The new
project will provide a superset of the original features, and the old runtime
will be removed once the new runtime is sufficiently developed.

See discussion at
https://discourse.llvm.org/t/rfc-move-orc-executor-support-into-top-level-project/81049
2025-08-19 10:56:18 +10:00

37 lines
1.2 KiB
CMake

# Keep track if we have all dependencies.
set(ORC_RT_LLVM_TOOLS_AVAILABLE TRUE)
if (NOT DEFINED ORC_RT_LLVM_TOOLS_DIR AND DEFINED LLVM_BINARY_DIR)
cmake_path(APPEND ORC_RT_LLVM_TOOLS_DIR "${LLVM_BINARY_DIR}" "bin")
endif()
if (TARGET utils/llvm-lit/all)
list(APPEND ORC_RT_TEST_DEPS utils/llvm-lit/all)
endif()
# Add dependence on FileCheck.
if (TARGET FileCheck)
list(APPEND ORC_RT_TEST_DEPS FileCheck)
endif()
find_program(ORC_RT_FILECHECK_EXECUTABLE
NAMES FileCheck
PATHS ${ORC_RT_LLVM_TOOLS_DIR})
if (NOT ORC_RT_FILECHECK_EXECUTABLE)
message(STATUS "Cannot find FileCheck. Please put it in your PATH, set ORC_RT_FILECHECK_EXECUTABLE to its full path, or point ORC_RT_LLVM_TOOLS_DIR to its directory.")
set(ORC_RT_LLVM_TOOLS_AVAILABLE FALSE)
endif()
# Add dependence on not.
if (TARGET not)
list(APPEND ORC_RT_TEST_DEPS not)
endif()
find_program(ORC_RT_NOT_EXECUTABLE
NAMES not
PATHS ${ORC_RT_LLVM_TOOLS_DIR})
if (NOT ORC_RT_NOT_EXECUTABLE)
message(STATUS "Cannot find 'not'. Please put it in your PATH, set ORC_RT_NOT_EXECUTABLE to its full path, or point ORC_RT_LLVM_TOOLS_DIR to its directory.")
set(ORC_RT_LLVM_TOOLS_AVAILABLE FALSE)
endif()