63 | | set (CODESIGN_IDENTITY lldb_codesign) |
64 | | execute_process( |
65 | | COMMAND xcrun -f codesign_allocate |
66 | | OUTPUT_STRIP_TRAILING_WHITESPACE |
67 | | OUTPUT_VARIABLE CODESIGN_ALLOCATE |
68 | | ) |
69 | | # Older cmake versions don't support "-E env". |
70 | | if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2) |
71 | | add_custom_command(TARGET debugserver |
72 | | POST_BUILD |
73 | | # Note: --entitlements option removed, as it causes errors when debugging. |
74 | | # was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver |
75 | | COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver |
76 | | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin |
77 | | ) |
78 | | else() |
79 | | add_custom_command(TARGET debugserver |
80 | | POST_BUILD |
81 | | # Note: --entitlements option removed (see comment above). |
82 | | COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver |
83 | | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin |
84 | | ) |
85 | | endif() |
| 63 | #set (CODESIGN_IDENTITY lldb_codesign) |
| 64 | #execute_process( |
| 65 | # COMMAND xcrun -f codesign_allocate |
| 66 | # OUTPUT_STRIP_TRAILING_WHITESPACE |
| 67 | # OUTPUT_VARIABLE CODESIGN_ALLOCATE |
| 68 | # ) |
| 69 | ## Older cmake versions don't support "-E env". |
| 70 | #if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2) |
| 71 | # add_custom_command(TARGET debugserver |
| 72 | # POST_BUILD |
| 73 | # # Note: --entitlements option removed, as it causes errors when debugging. |
| 74 | # # was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver |
| 75 | # COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver |
| 76 | # WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin |
| 77 | # ) |
| 78 | #else() |
| 79 | # add_custom_command(TARGET debugserver |
| 80 | # POST_BUILD |
| 81 | # # Note: --entitlements option removed (see comment above). |
| 82 | # COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver |
| 83 | # WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin |
| 84 | # ) |
| 85 | #endif() |