Index: openmp/trunk/libomptarget/test/CMakeLists.txt =================================================================== --- openmp/trunk/libomptarget/test/CMakeLists.txt +++ openmp/trunk/libomptarget/test/CMakeLists.txt @@ -23,22 +23,22 @@ "C++ compiler to use for testing OpenMP offloading library") set(LIBOMPTARGET_TEST_OPENMP_FLAG -fopenmp CACHE STRING "OpenMP compiler flag to use for testing OpenMP offloading library") - set(LIBOMPTARGET_LLVM_LIT_EXECUTABLE "" CACHE STRING - "Path to llvm-lit") - find_program(LIT_EXECUTABLE NAMES llvm-lit ${LIBOMPTARGET_LLVM_LIT_EXECUTABLE}) - if(NOT LIT_EXECUTABLE) + find_program(LIBOMPTARGET_LLVM_LIT_EXECUTABLE + NAMES llvm-lit lit.py lit + PATHS ${OPENMP_LLVM_TOOLS_DIR}) + if(NOT LIBOMPTARGET_LLVM_LIT_EXECUTABLE) libomptarget_say("Cannot find llvm-lit.") - libomptarget_say("Please put llvm-lit in your PATH or set LIBOMPTARGET_LLVM_LIT_EXECUTABLE to its full path") + libomptarget_say("Please put llvm-lit in your PATH or set LIBOMPTARGET_LLVM_LIT_EXECUTABLE to its full path or point OPENMP_LLVM_TOOLS_DIR to its directory") libomptarget_warning_say("The check-libomptarget target will not be available!") return() endif() - set(LIBOMPTARGET_FILECHECK_EXECUTABLE "" CACHE STRING - "Path to FileCheck") - find_program(LIBOMPTARGET_FILECHECK NAMES FileCheck ${LIBOMPTARGET_FILECHECK_EXECUTABLE}) - if(NOT LIBOMPTARGET_FILECHECK) + find_program(LIBOMPTARGET_FILECHECK_EXECUTABLE + NAMES FileCheck + PATHS ${OPENMP_LLVM_TOOLS_DIR}) + if(NOT LIBOMPTARGET_FILECHECK_EXECUTABLE) libomptarget_say("Cannot find FileCheck.") - libomptarget_say("Please put FileCheck in your PATH or set LIBOMPTARGET_FILECHECK_EXECUTABLE to its full path") + libomptarget_say("Please put FileCheck in your PATH or set LIBOMPTARGET_FILECHECK_EXECUTABLE to its full path or point OPENMP_LLVM_TOOLS_DIR to its directory") libomptarget_warning_say("The check-libomptarget target will not be available!") return() endif() @@ -55,7 +55,7 @@ "Default options for lit") separate_arguments(LIBOMPTARGET_LIT_ARGS) add_custom_target(check-libomptarget - COMMAND ${PYTHON_EXECUTABLE} ${LIT_EXECUTABLE} ${LIBOMPTARGET_LIT_ARGS} ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${PYTHON_EXECUTABLE} ${LIBOMPTARGET_LLVM_LIT_EXECUTABLE} ${LIBOMPTARGET_LIT_ARGS} ${CMAKE_CURRENT_BINARY_DIR} DEPENDS omptarget COMMENT "Running libomptarget tests" ${cmake_3_2_USES_TERMINAL} @@ -70,7 +70,7 @@ if(NOT MSVC) set(LIBOMPTARGET_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) set(LIBOMPTARGET_TEST_CXX_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++) - set(LIBOMPTARGET_FILECHECK ${LLVM_RUNTIME_OUTPUT_INTDIR}/FileCheck) + set(LIBOMPTARGET_FILECHECK_EXECUTABLE ${LLVM_RUNTIME_OUTPUT_INTDIR}/FileCheck) else() libomptarget_warning_say("Not prepared to run tests on Windows systems.") endif() Index: openmp/trunk/libomptarget/test/lit.site.cfg.in =================================================================== --- openmp/trunk/libomptarget/test/lit.site.cfg.in +++ openmp/trunk/libomptarget/test/lit.site.cfg.in @@ -13,7 +13,7 @@ config.operating_system = "@CMAKE_SYSTEM_NAME@" config.libomptarget_all_targets = "@LIBOMPTARGET_ALL_TARGETS@".split() config.libomptarget_system_targets = "@LIBOMPTARGET_SYSTEM_TARGETS@".split() -config.libomptarget_filecheck = "@LIBOMPTARGET_FILECHECK@" +config.libomptarget_filecheck = "@LIBOMPTARGET_FILECHECK_EXECUTABLE@" # Let the main config do the real work. lit_config.load_config(config, "@LIBOMPTARGET_BASE_DIR@/test/lit.cfg")