This revision was automatically updated to reflect the committed changes.
Closed by commit rL325442: [cmake] Fix LLDB_CODESIGN_IDENTITY logic. (authored 
by dhinton, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D43432

Files:
  lldb/trunk/CMakeLists.txt
  lldb/trunk/tools/debugserver/source/CMakeLists.txt


Index: lldb/trunk/CMakeLists.txt
===================================================================
--- lldb/trunk/CMakeLists.txt
+++ lldb/trunk/CMakeLists.txt
@@ -57,21 +57,6 @@
   add_subdirectory(scripts)
 endif ()
 
-if(CMAKE_HOST_APPLE)
-  if(LLDB_CODESIGN_IDENTITY)
-    set(DEBUGSERVER_PATH $<TARGET_FILE:debugserver>)
-  else()
-    execute_process(
-      COMMAND xcode-select -p
-      OUTPUT_VARIABLE XCODE_DEV_DIR)
-    string(STRIP ${XCODE_DEV_DIR} XCODE_DEV_DIR)
-    set(DEBUGSERVER_PATH
-      
"${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver")
-    set(SKIP_DEBUGSERVER True)
-  endif()
-  message(STATUS "Path to the lldb debugserver: ${DEBUGSERVER_PATH}")
-endif()
-
 add_subdirectory(source)
 add_subdirectory(tools)
 
Index: lldb/trunk/tools/debugserver/source/CMakeLists.txt
===================================================================
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt
@@ -95,6 +95,22 @@
 add_library(lldbDebugserverCommon ${lldbDebugserverCommonSources})
 
 
+set(LLDB_CODESIGN_IDENTITY "lldb_codesign"
+  CACHE STRING "Identity used for code signing. Set to empty string to skip 
the signing step.")
+
+if(NOT LLDB_CODESIGN_IDENTITY STREQUAL "")
+  set(DEBUGSERVER_PATH $<TARGET_FILE:debugserver>)
+else()
+  execute_process(
+    COMMAND xcode-select -p
+    OUTPUT_VARIABLE XCODE_DEV_DIR)
+  string(STRIP ${XCODE_DEV_DIR} XCODE_DEV_DIR)
+  set(DEBUGSERVER_PATH
+    
"${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver")
+  set(SKIP_DEBUGSERVER True)
+endif()
+message(STATUS "Path to the lldb debugserver: ${DEBUGSERVER_PATH}")
+
 if (APPLE)
   if(IOS)
     find_library(BACKBOARD_LIBRARY BackBoardServices
@@ -187,15 +203,13 @@
   set(entitlements_xml 
${CMAKE_CURRENT_SOURCE_DIR}/debugserver-entitlements.plist)
 endif()
 
-set(LLDB_CODESIGN_IDENTITY "lldb_codesign"
-  CACHE STRING "Identity used for code signing. Set to empty string to skip 
the signing step.")
 set(LLDB_USE_ENTITLEMENTS_Default On)
 if("${LLDB_CODESIGN_IDENTITY}" STREQUAL "lldb_codesign")
   set(LLDB_USE_ENTITLEMENTS_Default Off)
 endif()
 option(LLDB_USE_ENTITLEMENTS "Use entitlements when codesigning (Defaults Off 
when using lldb_codesign identity, otherwise On)" 
${LLDB_USE_ENTITLEMENTS_Default})
 
-if ("${LLDB_CODESIGN_IDENTITY}" STREQUAL "")
+if (SKIP_DEBUGSERVER)
   if (CMAKE_HOST_APPLE)
     # If we haven't built a signed debugserver, copy the one from the system.
     add_custom_target(debugserver


Index: lldb/trunk/CMakeLists.txt
===================================================================
--- lldb/trunk/CMakeLists.txt
+++ lldb/trunk/CMakeLists.txt
@@ -57,21 +57,6 @@
   add_subdirectory(scripts)
 endif ()
 
-if(CMAKE_HOST_APPLE)
-  if(LLDB_CODESIGN_IDENTITY)
-    set(DEBUGSERVER_PATH $<TARGET_FILE:debugserver>)
-  else()
-    execute_process(
-      COMMAND xcode-select -p
-      OUTPUT_VARIABLE XCODE_DEV_DIR)
-    string(STRIP ${XCODE_DEV_DIR} XCODE_DEV_DIR)
-    set(DEBUGSERVER_PATH
-      "${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver")
-    set(SKIP_DEBUGSERVER True)
-  endif()
-  message(STATUS "Path to the lldb debugserver: ${DEBUGSERVER_PATH}")
-endif()
-
 add_subdirectory(source)
 add_subdirectory(tools)
 
Index: lldb/trunk/tools/debugserver/source/CMakeLists.txt
===================================================================
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt
@@ -95,6 +95,22 @@
 add_library(lldbDebugserverCommon ${lldbDebugserverCommonSources})
 
 
+set(LLDB_CODESIGN_IDENTITY "lldb_codesign"
+  CACHE STRING "Identity used for code signing. Set to empty string to skip the signing step.")
+
+if(NOT LLDB_CODESIGN_IDENTITY STREQUAL "")
+  set(DEBUGSERVER_PATH $<TARGET_FILE:debugserver>)
+else()
+  execute_process(
+    COMMAND xcode-select -p
+    OUTPUT_VARIABLE XCODE_DEV_DIR)
+  string(STRIP ${XCODE_DEV_DIR} XCODE_DEV_DIR)
+  set(DEBUGSERVER_PATH
+    "${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver")
+  set(SKIP_DEBUGSERVER True)
+endif()
+message(STATUS "Path to the lldb debugserver: ${DEBUGSERVER_PATH}")
+
 if (APPLE)
   if(IOS)
     find_library(BACKBOARD_LIBRARY BackBoardServices
@@ -187,15 +203,13 @@
   set(entitlements_xml ${CMAKE_CURRENT_SOURCE_DIR}/debugserver-entitlements.plist)
 endif()
 
-set(LLDB_CODESIGN_IDENTITY "lldb_codesign"
-  CACHE STRING "Identity used for code signing. Set to empty string to skip the signing step.")
 set(LLDB_USE_ENTITLEMENTS_Default On)
 if("${LLDB_CODESIGN_IDENTITY}" STREQUAL "lldb_codesign")
   set(LLDB_USE_ENTITLEMENTS_Default Off)
 endif()
 option(LLDB_USE_ENTITLEMENTS "Use entitlements when codesigning (Defaults Off when using lldb_codesign identity, otherwise On)" ${LLDB_USE_ENTITLEMENTS_Default})
 
-if ("${LLDB_CODESIGN_IDENTITY}" STREQUAL "")
+if (SKIP_DEBUGSERVER)
   if (CMAKE_HOST_APPLE)
     # If we haven't built a signed debugserver, copy the one from the system.
     add_custom_target(debugserver
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to