[lld] r257002 - Set CMake ADDITIONAL_HEADER_DIRS on libraries with headers in /include. NFC.
Pete Cooper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 6 16:14:09 PST 2016
Author: pete
Date: Wed Jan 6 18:14:09 2016
New Revision: 257002
URL: http://llvm.org/viewvc/llvm-project?rev=257002&view=rev
Log:
Set CMake ADDITIONAL_HEADER_DIRS on libraries with headers in /include. NFC.
In a UI such as XCode, it can group the headers for a library with that library.
This is done in the CMakeLists.txt for the library itself by setting the path(s)
as ADDITIONAL_HEADER_DIRS.
LLVM already does this for all of its libraries, so just adding this to lld to
make things easier. Should be NFC.
Modified:
lld/trunk/CMakeLists.txt
lld/trunk/lib/Config/CMakeLists.txt
lld/trunk/lib/Core/CMakeLists.txt
lld/trunk/lib/Driver/CMakeLists.txt
lld/trunk/lib/ReaderWriter/CMakeLists.txt
Modified: lld/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/CMakeLists.txt?rev=257002&r1=257001&r2=257002&view=diff
==============================================================================
--- lld/trunk/CMakeLists.txt (original)
+++ lld/trunk/CMakeLists.txt Wed Jan 6 18:14:09 2016
@@ -1,4 +1,5 @@
set(LLD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set(LLD_INCLUDE_DIR ${LLD_SOURCE_DIR}/include )
set(LLD_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
# Compute the LLD version from the LLVM version.
Modified: lld/trunk/lib/Config/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Config/CMakeLists.txt?rev=257002&r1=257001&r2=257002&view=diff
==============================================================================
--- lld/trunk/lib/Config/CMakeLists.txt (original)
+++ lld/trunk/lib/Config/CMakeLists.txt Wed Jan 6 18:14:09 2016
@@ -1,5 +1,9 @@
add_lld_library(lldConfig
Version.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${LLD_INCLUDE_DIR}/lld/Config
+
LINK_LIBS
LLVMSupport
)
Modified: lld/trunk/lib/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/CMakeLists.txt?rev=257002&r1=257001&r2=257002&view=diff
==============================================================================
--- lld/trunk/lib/Core/CMakeLists.txt (original)
+++ lld/trunk/lib/Core/CMakeLists.txt Wed Jan 6 18:14:09 2016
@@ -7,6 +7,10 @@ add_lld_library(lldCore
Resolver.cpp
SymbolTable.cpp
Writer.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${LLD_INCLUDE_DIR}/lld/Core
+
LINK_LIBS
LLVMSupport
)
Modified: lld/trunk/lib/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/CMakeLists.txt?rev=257002&r1=257001&r2=257002&view=diff
==============================================================================
--- lld/trunk/lib/Driver/CMakeLists.txt (original)
+++ lld/trunk/lib/Driver/CMakeLists.txt Wed Jan 6 18:14:09 2016
@@ -14,6 +14,10 @@ add_lld_library(lldDriver
Driver.cpp
GnuLdDriver.cpp
UniversalDriver.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${LLD_INCLUDE_DIR}/lld/Driver
+
LINK_LIBS
lldConfig
lldMachO
Modified: lld/trunk/lib/ReaderWriter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CMakeLists.txt?rev=257002&r1=257001&r2=257002&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/CMakeLists.txt Wed Jan 6 18:14:09 2016
@@ -10,6 +10,10 @@ add_lld_library(lldReaderWriter
CoreLinkingContext.cpp
FileArchive.cpp
LinkerScript.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${LLD_INCLUDE_DIR}/lld/ReaderWriter
+
LINK_LIBS
lldCore
lldYAML
More information about the llvm-commits
mailing list