summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawn Perchik <dawn@burble.org>2015-10-22 22:48:52 +0000
committerDawn Perchik <dawn@burble.org>2015-10-22 22:48:52 +0000
commitbf568a6b8f105a5d3b6cf709fe36fe6d6576b514 (patch)
treea0470812a1cd73cfa1638431bfcde6e2763d00b4
parent03711cbd6c2b5f089007953527f839ece928a31b (diff)
downloadbcm5719-llvm-bf568a6b8f105a5d3b6cf709fe36fe6d6576b514.tar.gz
bcm5719-llvm-bf568a6b8f105a5d3b6cf709fe36fe6d6576b514.zip
[cmake] Fix cmake build on OSX after r250335 for older versions of cmake
Reviewed by: sas Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13995 llvm-svn: 251073
-rw-r--r--lldb/tools/debugserver/source/MacOSX/CMakeLists.txt22
1 files changed, 16 insertions, 6 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt b/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
index 4247209c80a..d319cb7b0ba 100644
--- a/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -66,13 +66,23 @@ execute_process(
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
OpenPOWER on IntegriCloud