[Lldb-commits] [lldb] a22301e - [lldb] Remove redundant add_definitions() in CMake (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 10 22:46:32 PDT 2020


Author: Jonas Devlieghere
Date: 2020-08-10T22:45:33-07:00
New Revision: a22301ef9899b77d02cc8ad6bea68009baa60413

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

LOG: [lldb] Remove redundant add_definitions() in CMake (NFC)

Remove the unused LLDB_CONFIGURATION_RELEASE and move LLDB_USE_OS_LOG
under debugserver which is the only one using it.

Added: 
    

Modified: 
    lldb/CMakeLists.txt
    lldb/tools/debugserver/source/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index df289747cf3a..8a0c4524182e 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -26,14 +26,8 @@ include(LLDBConfig)
 include(AddLLDB)
 
 # Define the LLDB_CONFIGURATION_xxx matching the build type.
-if( uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
-  add_definitions( -DLLDB_CONFIGURATION_DEBUG )
-else()
-  add_definitions( -DLLDB_CONFIGURATION_RELEASE )
-endif()
-
-if(APPLE)
-  add_definitions(-DLLDB_USE_OS_LOG)
+if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
+  add_definitions(-DLLDB_CONFIGURATION_DEBUG)
 endif()
 
 if (WIN32)

diff  --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index b29b3ddc3056..1fa880381821 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -129,6 +129,8 @@ if(LLDB_USE_ENTITLEMENTS)
   endif()
 endif()
 
+add_definitions(-DLLDB_USE_OS_LOG)
+
 if(${CMAKE_OSX_SYSROOT} MATCHES ".Internal.sdk$")
   message(STATUS "LLDB debugserver energy support is enabled")
   add_definitions(-DLLDB_ENERGY)


        


More information about the lldb-commits mailing list