diff options
author | Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> | 2016-02-05 07:00:13 +0000 |
---|---|---|
committer | Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> | 2016-02-05 07:00:13 +0000 |
commit | 66594990b1cd55a9cc265cd694f92a03da9543a3 (patch) | |
tree | 76002cc9a9e92816464a320563a3772cf30ef68a | |
parent | 084e363517fc2248412f227862cdabd2f439e83d (diff) | |
download | bcm5719-llvm-66594990b1cd55a9cc265cd694f92a03da9543a3.tar.gz bcm5719-llvm-66594990b1cd55a9cc265cd694f92a03da9543a3.zip |
[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
llvm-svn: 259876
-rw-r--r-- | openmp/CMakeLists.txt | 3 | ||||
-rw-r--r-- | openmp/runtime/Build_With_CMake.txt | 8 | ||||
-rw-r--r-- | openmp/runtime/test/CMakeLists.txt | 7 |
3 files changed, 16 insertions, 2 deletions
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt index 7011187b93c..3d60633b33b 100644 --- a/openmp/CMakeLists.txt +++ b/openmp/CMakeLists.txt @@ -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) diff --git a/openmp/runtime/Build_With_CMake.txt b/openmp/runtime/Build_With_CMake.txt index 32586245abc..cebf794d3a3 100644 --- a/openmp/runtime/Build_With_CMake.txt +++ b/openmp/runtime/Build_With_CMake.txt @@ -176,6 +176,14 @@ Specifies install location of Hwloc. The configuration system will look for 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 ================================ diff --git a/openmp/runtime/test/CMakeLists.txt b/openmp/runtime/test/CMakeLists.txt index 1bccfc13edf..d7692ec6bfd 100644 --- a/openmp/runtime/test/CMakeLists.txt +++ b/openmp/runtime/test/CMakeLists.txt @@ -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() |