[Lldb-commits] [lldb] 6d57511 - [lldb-server] Prefer target_include_directories

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 13 14:56:24 PST 2020


Author: Alex Langford
Date: 2020-01-13T14:54:57-08:00
New Revision: 6d57511e0b6f95a369efe7274923a36de3489e7b

URL: https://github.com/llvm/llvm-project/commit/6d57511e0b6f95a369efe7274923a36de3489e7b
DIFF: https://github.com/llvm/llvm-project/commit/6d57511e0b6f95a369efe7274923a36de3489e7b.diff

LOG: [lldb-server] Prefer target_include_directories

In the documentation of `include_directories`, it notes that
`target_include_directories` is preferred because it affects
specific targets intead of propagating include search paths
to the entire project.

Added: 
    

Modified: 
    lldb/tools/lldb-server/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/tools/lldb-server/CMakeLists.txt b/lldb/tools/lldb-server/CMakeLists.txt
index 7754e9d05cbc..7443c6c90e8c 100644
--- a/lldb/tools/lldb-server/CMakeLists.txt
+++ b/lldb/tools/lldb-server/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(../../source)
-
 set(LLDB_PLUGINS)
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
@@ -52,4 +50,5 @@ add_lldb_tool(lldb-server
       Support
 )
 
+target_include_directories(lldb-server PRIVATE "${LLDB_SOURCE_DIR}/source")
 target_link_libraries(lldb-server PRIVATE ${LLDB_SYSTEM_LIBS})


        


More information about the lldb-commits mailing list