[Lldb-commits] [PATCH] D13995: [cmake] Fix cmake build on OSX after r250335 for older versions of cmake

Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 22 15:51:11 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL251073: [cmake] Fix cmake build on OSX after r250335 for older versions of cmake (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D13995?vs=38176&id=38185#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13995

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

Index: lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
===================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
+++ lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -66,13 +66,23 @@
   OUTPUT_STRIP_TRAILING_WHITESPACE
   OUTPUT_VARIABLE CODESIGN_ALLOCATE
   )
-add_custom_command(TARGET debugserver
-  POST_BUILD
-  # --entitlements option removed, as it causes errors when debugging.
-  #was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver
-  COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+# Older cmake versions don't support "-E env".
+if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2)
+  add_custom_command(TARGET debugserver
+    POST_BUILD
+    # Note: --entitlements option removed, as it causes errors when debugging.
+    # was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver
+    COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+  )
+else()
+  add_custom_command(TARGET debugserver
+    POST_BUILD
+    # Note: --entitlements option removed (see comment above).
+    COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
   )
+endif()
 
 install(TARGETS debugserver
   RUNTIME DESTINATION bin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13995.38185.patch
Type: text/x-patch
Size: 1827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151022/490c91bd/attachment.bin>


More information about the lldb-commits mailing list