Skip to content

Commit

Permalink
Add fatal for faulty XCode installation (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasDuswald committed Nov 21, 2023
1 parent 1f55c00 commit c0cb684
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmake/external/ROOT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ if(APPLE)
"${DETECTED_OS_VERS}" MATCHES "^osx-12" OR
"${DETECTED_OS_VERS}" MATCHES "^osx-11.6" OR
"${DETECTED_OS_VERS}" MATCHES "^osx-11.7")
# Test if Xcode is installed via `xcodebuild -version`.
message(STATUS "##### Checking if XCODE is installed")
execute_process(COMMAND bash "-c" "xcodebuild -version" ERROR_VARIABLE XCODE_ERROR)
if("${XCODE_ERROR}" STREQUAL "")
message(STATUS "##### XCODE is installed")
else()
message(FATAL_ERROR "##### XCODE is not installed correctly. Please install XCODE (and then the command line tools). Consult issue #352 and the documentation")
endif()
# Determine XCDOE version
execute_process(COMMAND bash "-c" "xcodebuild -version | sed -En 's/Xcode[[:space:]]+([0-9\.]*)/\\1/p'" OUTPUT_VARIABLE XCODE_VERS)
message(STATUS "##### XCODE version: ${XCODE_VERS}")
# Set appropriate ROOT version depending on XCODE version
if("${XCODE_VERS}" GREATER_EQUAL "14.3")
message(STATUS "##### Using ROOT builds for XCODE 14.3")
set(ROOT_TAR_FILE root_v6.29.01_cxx14_python3.9_osx-xcode-14.3-${DETECTED_ARCH}.tar.gz)
Expand Down

0 comments on commit c0cb684

Please sign in to comment.