forked from OSchip/llvm-project
[lldb] Use modern CMake to avoid repetition (NFC)
Use the target variants of include_directories and add_definitions to avoid repetition.
This commit is contained in:
parent
a542eec462
commit
bca43666e7
|
@ -1,8 +1,9 @@
|
|||
include_directories(${LLDB_SOURCE_DIR}/source/Plugins/Process/Linux)
|
||||
|
||||
add_lldb_unittest(ProcessorTraceTests
|
||||
ProcessorTraceTest.cpp
|
||||
|
||||
LINK_LIBS
|
||||
lldbPluginProcessLinux
|
||||
)
|
||||
|
||||
target_include_directories(ProcessorTraceTests PRIVATE
|
||||
${LLDB_SOURCE_DIR}/source/Plugins/Process/Linux)
|
|
@ -1,8 +1,9 @@
|
|||
include_directories(${LLDB_SOURCE_DIR}/source/Plugins/Process/POSIX)
|
||||
|
||||
add_lldb_unittest(ProcessPOSIXTests
|
||||
NativeProcessELFTest.cpp
|
||||
|
||||
LINK_LIBS
|
||||
lldbPluginProcessPOSIX
|
||||
)
|
||||
|
||||
target_include_directories(ProcessPOSIXTests PRIVATE
|
||||
${LLDB_SOURCE_DIR}/source/Plugins/Process/POSIX)
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
# Gtest 1.8.0 uses tr1/tuple which is deprecated on MSVC, so we force it off.
|
||||
add_definitions(-DGTEST_HAS_TR1_TUPLE=0)
|
||||
|
||||
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
|
||||
add_lldb_library(lldbUtilityHelpers
|
||||
MockTildeExpressionResolver.cpp
|
||||
|
@ -14,6 +11,5 @@ add_lldb_library(lldbUtilityHelpers
|
|||
Support
|
||||
ObjectYAML
|
||||
)
|
||||
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
|
||||
|
||||
add_subdirectory(Symbol)
|
||||
|
|
|
@ -7,7 +7,9 @@ add_lldb_library(lldbSymbolHelpers
|
|||
# with MSVC, so it falls back to tr1 / experimental classes. Since LLVM
|
||||
# itself requires C++11, we can safely force it on unconditionally so that
|
||||
# we don't have to fight with the buggy gtest check.
|
||||
add_definitions(-DGTEST_LANG_CXX11=1)
|
||||
add_definitions(-DGTEST_HAS_TR1_TUPLE=0)
|
||||
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
|
||||
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
|
||||
target_compile_definitions(lldbSymbolHelpers PUBLIC
|
||||
-DGTEST_LANG_CXX11=1
|
||||
-DGTEST_HAS_TR1_TUPLE=0)
|
||||
target_include_directories(lldbSymbolHelpers PUBLIC
|
||||
${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include
|
||||
${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
# of the debugserver communication path. If you are looking for a non-darwin
|
||||
# remote debugging server, please use lldb-server.
|
||||
|
||||
include_directories(${LLDB_SOURCE_DIR}/tools/debugserver/source
|
||||
${LLDB_SOURCE_DIR}/tools/debugserver/source/MacOSX)
|
||||
|
||||
add_lldb_unittest(debugserverTests
|
||||
JSONTest.cpp
|
||||
RNBSocketTest.cpp
|
||||
|
@ -20,6 +17,10 @@ add_lldb_unittest(debugserverTests
|
|||
Support
|
||||
)
|
||||
|
||||
target_include_directories(debugserverTests PRIVATE
|
||||
${LLDB_SOURCE_DIR}/tools/debugserver/source
|
||||
${LLDB_SOURCE_DIR}/tools/debugserver/source/MacOSX)
|
||||
|
||||
if(IOS)
|
||||
set_property(TARGET debugserverTests APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
WITH_LOCKDOWN
|
||||
|
|
Loading…
Reference in New Issue