Browse Source

ENH: fail if install_name_tool wasn't found

Alex
Alexander Neundorf 18 năm trước cách đây
mục cha
commit
ba2988e4c5
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      Modules/CMakeFindBinUtils.cmake

+ 4 - 0
Modules/CMakeFindBinUtils.cmake

@@ -39,6 +39,10 @@ IF(APPLE)
   FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
   FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
   FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool)
   FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool)
 
 
+  IF(NOT CMAKE_INSTALL_NAME_TOOL)
+    MESSAGE(FATAL_ERROR "Could not find install_name_tool, please check your installation.")
+  ENDIF(NOT CMAKE_INSTALL_NAME_TOOL)
+
   MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
   MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
 ENDIF(APPLE)
 ENDIF(APPLE)