[llvm] r280013 - [CMake] Make LLVMConfig.cmake variable names match in-tree names

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 14:26:32 PDT 2016


Author: cbieneman
Date: Mon Aug 29 16:26:32 2016
New Revision: 280013

URL: http://llvm.org/viewvc/llvm-project?rev=280013&view=rev
Log:
[CMake] Make LLVMConfig.cmake variable names match in-tree names

With the runtimes build we're trying to use LLVMConfig.cmake as a way of providing LLVM_* variables that are needed to behave as if the project is building in tree. To make this work we need to rename two variables by dropping the "S" from the end. This makes the variables match the in-tree names.

This renames:
LLVM_INCLUDE_DIRS -> LLVM_INCLUDE_DIR
LLVM_LIBRARY_DIRS -> LLVM_LIBRARY_DIR

The versions ending in S are not used in-tree anywhere. This also cleans up LLVM_LIBRARY_DIR being set to the same value with and without the "S".

Modified:
    llvm/trunk/cmake/modules/LLVMConfig.cmake.in
    llvm/trunk/docs/CMake.rst

Modified: llvm/trunk/cmake/modules/LLVMConfig.cmake.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake.in?rev=280013&r1=280012&r2=280013&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake.in (original)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake.in Mon Aug 29 16:26:32 2016
@@ -52,8 +52,7 @@ set(LLVM_ON_WIN32 @LLVM_ON_WIN32@)
 
 set(LLVM_LIBDIR_SUFFIX @LLVM_LIBDIR_SUFFIX@)
 
-set(LLVM_INCLUDE_DIRS "@LLVM_CONFIG_INCLUDE_DIRS@")
-set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBRARY_DIRS@")
+set(LLVM_INCLUDE_DIR "@LLVM_CONFIG_INCLUDE_DIRS@")
 set(LLVM_LIBRARY_DIR "@LLVM_CONFIG_LIBRARY_DIRS@")
 set(LLVM_DEFINITIONS "@LLVM_DEFINITIONS@")
 set(LLVM_CMAKE_DIR "@LLVM_CONFIG_CMAKE_DIR@")

Modified: llvm/trunk/docs/CMake.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.rst?rev=280013&r1=280012&r2=280013&view=diff
==============================================================================
--- llvm/trunk/docs/CMake.rst (original)
+++ llvm/trunk/docs/CMake.rst Mon Aug 29 16:26:32 2016
@@ -579,7 +579,7 @@ and uses them to build a simple applicat
   # you will need to enable C++11 support
   # for your compiler.
 
-  include_directories(${LLVM_INCLUDE_DIRS})
+  include_directories(${LLVM_INCLUDE_DIR})
   add_definitions(${LLVM_DEFINITIONS})
 
   # Now build our tools
@@ -636,8 +636,8 @@ include
   This is set to ON if LLVM was built with run time type information (RTTI),
   otherwise OFF.
 
-``LLVM_INCLUDE_DIRS``
-  A list of include paths to directories containing LLVM header files.
+``LLVM_INCLUDE_DIR``
+  Path to the root directory containing LLVM header files.
 
 ``LLVM_PACKAGE_VERSION``
   The LLVM version. This string can be used with CMake conditionals, e.g., ``if
@@ -681,7 +681,7 @@ Contents of ``<project dir>/CMakeLists.t
   find_package(LLVM REQUIRED CONFIG)
 
   add_definitions(${LLVM_DEFINITIONS})
-  include_directories(${LLVM_INCLUDE_DIRS})
+  include_directories(${LLVM_INCLUDE_DIR})
 
   add_subdirectory(<pass name>)
 




More information about the llvm-commits mailing list