Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -11,14 +11,6 @@ include(LLDBConfig) include(AddLLDB) -option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON) -set(LLDB_CODESIGN_IDENTITY lldb_codesign CACHE STRING - "Identity for code signing debugserver (Darwin only)") - -if(LLDB_CODESIGN_IDENTITY) - set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY} CACHE STRING "" FORCE) -endif() - # Define the LLDB_CONFIGURATION_xxx matching the build type if( uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) add_definitions( -DLLDB_CONFIGURATION_DEBUG ) Index: cmake/modules/LLDBConfig.cmake =================================================================== --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -50,6 +50,14 @@ add_definitions( -DLLDB_DISABLE_CURSES ) endif() +option(LLDB_USE_ENTITLEMENTS "When code signing, use entitlements if available" ON) +set(LLDB_CODESIGN_IDENTITY lldb_codesign CACHE STRING + "Identity for code signing debugserver (Darwin only)") + +if(LLDB_CODESIGN_IDENTITY) + set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY} CACHE STRING "" FORCE) +endif() + # On Windows, we can't use the normal FindPythonLibs module that comes with CMake, # for a number of reasons. # 1) Prior to MSVC 2015, it is only possible to embed Python if python itself was Index: tools/debugserver/CMakeLists.txt =================================================================== --- tools/debugserver/CMakeLists.txt +++ tools/debugserver/CMakeLists.txt @@ -15,7 +15,7 @@ set(LLDB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../") include_directories(${LLDB_SOURCE_DIR}/include) - option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON) + option(LLDB_USE_ENTITLEMENTS "When code signing, use entitlements if available" ON) set(LLDB_CODESIGN_IDENTITY lldb_codesign CACHE STRING "Identity for code signing debugserver (Darwin only)") Index: tools/debugserver/source/CMakeLists.txt =================================================================== --- tools/debugserver/source/CMakeLists.txt +++ tools/debugserver/source/CMakeLists.txt @@ -142,7 +142,7 @@ if(CMAKE_HOST_APPLE AND NOT LLVM_CODESIGNING_IDENTITY STREQUAL "lldb_codesign") set(msg "Cannot code sign debugserver with identity '${LLVM_CODESIGNING_IDENTITY}'.") if(system_debugserver) - message(WARNING "${msg} Will fall back to system's debugserver.") + message(WARNING "${msg} Will fall back to copy system's debugserver.") set(use_system_debugserver ON) else() message(WARNING "${msg} debugserver will not be available.")