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
|
add_lldb_unittest(ProcessorTraceTests
|
||||||
ProcessorTraceTest.cpp
|
ProcessorTraceTest.cpp
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
lldbPluginProcessLinux
|
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
|
add_lldb_unittest(ProcessPOSIXTests
|
||||||
NativeProcessELFTest.cpp
|
NativeProcessELFTest.cpp
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
lldbPluginProcessPOSIX
|
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)
|
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
|
||||||
add_lldb_library(lldbUtilityHelpers
|
add_lldb_library(lldbUtilityHelpers
|
||||||
MockTildeExpressionResolver.cpp
|
MockTildeExpressionResolver.cpp
|
||||||
|
@ -14,6 +11,5 @@ add_lldb_library(lldbUtilityHelpers
|
||||||
Support
|
Support
|
||||||
ObjectYAML
|
ObjectYAML
|
||||||
)
|
)
|
||||||
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
|
|
||||||
|
|
||||||
add_subdirectory(Symbol)
|
add_subdirectory(Symbol)
|
||||||
|
|
|
@ -7,7 +7,9 @@ add_lldb_library(lldbSymbolHelpers
|
||||||
# with MSVC, so it falls back to tr1 / experimental classes. Since LLVM
|
# 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
|
# itself requires C++11, we can safely force it on unconditionally so that
|
||||||
# we don't have to fight with the buggy gtest check.
|
# we don't have to fight with the buggy gtest check.
|
||||||
add_definitions(-DGTEST_LANG_CXX11=1)
|
target_compile_definitions(lldbSymbolHelpers PUBLIC
|
||||||
add_definitions(-DGTEST_HAS_TR1_TUPLE=0)
|
-DGTEST_LANG_CXX11=1
|
||||||
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
|
-DGTEST_HAS_TR1_TUPLE=0)
|
||||||
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
|
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
|
# of the debugserver communication path. If you are looking for a non-darwin
|
||||||
# remote debugging server, please use lldb-server.
|
# 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
|
add_lldb_unittest(debugserverTests
|
||||||
JSONTest.cpp
|
JSONTest.cpp
|
||||||
RNBSocketTest.cpp
|
RNBSocketTest.cpp
|
||||||
|
@ -20,6 +17,10 @@ add_lldb_unittest(debugserverTests
|
||||||
Support
|
Support
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(debugserverTests PRIVATE
|
||||||
|
${LLDB_SOURCE_DIR}/tools/debugserver/source
|
||||||
|
${LLDB_SOURCE_DIR}/tools/debugserver/source/MacOSX)
|
||||||
|
|
||||||
if(IOS)
|
if(IOS)
|
||||||
set_property(TARGET debugserverTests APPEND PROPERTY COMPILE_DEFINITIONS
|
set_property(TARGET debugserverTests APPEND PROPERTY COMPILE_DEFINITIONS
|
||||||
WITH_LOCKDOWN
|
WITH_LOCKDOWN
|
||||||
|
|
Loading…
Reference in New Issue