[Openmp-commits] [openmp] r259876 - [CMake] Introduce OPENMP_LLVM_TOOLS_DIR
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 4 23:00:13 PST 2016
Author: hahnfeld
Date: Fri Feb 5 01:00:13 2016
New Revision: 259876
URL: http://llvm.org/viewvc/llvm-project?rev=259876&view=rev
Log:
[CMake] Introduce OPENMP_LLVM_TOOLS_DIR
This will be used in a later patch to find additional LLVM tools for tests and
enables reusability for libomptarget that is currently under review.
Differential Revision: http://reviews.llvm.org/D16713
Modified:
openmp/trunk/CMakeLists.txt
openmp/trunk/runtime/Build_With_CMake.txt
openmp/trunk/runtime/test/CMakeLists.txt
Modified: openmp/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/CMakeLists.txt?rev=259876&r1=259875&r2=259876&view=diff
==============================================================================
--- openmp/trunk/CMakeLists.txt (original)
+++ openmp/trunk/CMakeLists.txt Fri Feb 5 01:00:13 2016
@@ -1,2 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+set(OPENMP_LLVM_TOOLS_DIR "" CACHE PATH "Path to LLVM tools for testing")
+
add_subdirectory(runtime)
Modified: openmp/trunk/runtime/Build_With_CMake.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/Build_With_CMake.txt?rev=259876&r1=259875&r2=259876&view=diff
==============================================================================
--- openmp/trunk/runtime/Build_With_CMake.txt (original)
+++ openmp/trunk/runtime/Build_With_CMake.txt Fri Feb 5 01:00:13 2016
@@ -176,6 +176,14 @@ Specifies install location of Hwloc. The
hwloc.h in ${LIBOMP_HWLOC_INSTALL_DIR}/include and the library in
${LIBOMP_HWLOC_INSTALL_DIR}/lib.
+-DLIBOMP_LLVM_LIT_EXECUTABLE=/path/to/llvm-lit
+Default: search in PATH
+Specifiy full path to llvm-lit executable for running tests.
+
+-DOPENMP_LLVM_TOOLS_DIR=/path/to/built/llvm/tools
+Default: search for tools in path
+Additional path to search for LLVM tools needed by tests.
+
================================
How to append flags to the build
================================
Modified: openmp/trunk/runtime/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/CMakeLists.txt?rev=259876&r1=259875&r2=259876&view=diff
==============================================================================
--- openmp/trunk/runtime/test/CMakeLists.txt (original)
+++ openmp/trunk/runtime/test/CMakeLists.txt Fri Feb 5 01:00:13 2016
@@ -34,10 +34,13 @@ if(${LIBOMP_STANDALONE_BUILD})
"OpenMP compiler flag to use for testing OpenMP library")
set(LIBOMP_LLVM_LIT_EXECUTABLE "" CACHE STRING
"Path to llvm-lit")
- find_program(LIT_EXECUTABLE NAMES llvm-lit ${LIBOMP_LLVM_LIT_EXECUTABLE})
+ find_program(LIT_EXECUTABLE
+ NAMES llvm-lit
+ HINTS ${LIBOMP_LLVM_LIT_EXECUTABLE}
+ PATHS ${OPENMP_LLVM_TOOLS_DIR})
if(NOT LIT_EXECUTABLE)
libomp_say("Cannot find llvm-lit.")
- libomp_say("Please put llvm-lit in your PATH or set LIBOMP_LLVM_LIT_EXECUTABLE to its full path")
+ libomp_say("Please put llvm-lit in your PATH, set LIBOMP_LLVM_LIT_EXECUTABLE to its full path or point OPENMP_LLVM_TOOLS_DIR to its directory")
libomp_warning_say("The check-libomp target will not be available!")
return()
endif()
More information about the Openmp-commits
mailing list