[Openmp-commits] [PATCH] D16713: [CMake] Introduce LIBOMP_LLVM_TOOLS_DIR
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jan 29 00:56:44 PST 2016
Hahnfeld created this revision.
Hahnfeld added reviewers: jlpeyton, AndreyChurbanov.
Hahnfeld added subscribers: openmp-commits, tcramer.
This will be used in a later patch to find additional LLVM tools for tests.
(or can `LIBOMP_LLVM_LIT_EXECUTABLE` be completely replaced by `LIBOMP_LLVM_TOOLS_DIR`?)
http://reviews.llvm.org/D16713
Files:
runtime/Build_With_CMake.txt
runtime/test/CMakeLists.txt
Index: runtime/test/CMakeLists.txt
===================================================================
--- runtime/test/CMakeLists.txt
+++ runtime/test/CMakeLists.txt
@@ -32,12 +32,17 @@
"Compiler to use for testing OpenMP library")
set(LIBOMP_TEST_OPENMP_FLAG -fopenmp CACHE STRING
"OpenMP compiler flag to use for testing OpenMP library")
+ set(LIBOMP_LLVM_TOOLS_DIR "" CACHE PATH
+ "Path to LLVM tools")
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 ${LIBOMP_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 LIBOMP_LLVM_TOOLS_DIR to its directory")
libomp_warning_say("The check-libomp target will not be available!")
return()
endif()
Index: runtime/Build_With_CMake.txt
===================================================================
--- runtime/Build_With_CMake.txt
+++ runtime/Build_With_CMake.txt
@@ -171,6 +171,14 @@
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.
+
+-DLIBOMP_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
================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16713.46361.patch
Type: text/x-patch
Size: 1804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160129/c3b6f151/attachment-0001.bin>
More information about the Openmp-commits
mailing list