CMakeUnixFindMake.cmake 575 B

12345678910111213141516
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. find_program(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
  4. mark_as_advanced(CMAKE_MAKE_PROGRAM)
  5. # Look for a make tool provided by Xcode
  6. if(NOT CMAKE_MAKE_PROGRAM AND CMAKE_HOST_APPLE)
  7. execute_process(COMMAND xcrun --find make
  8. OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE
  9. ERROR_VARIABLE _xcrun_err)
  10. if(_xcrun_out)
  11. set_property(CACHE CMAKE_MAKE_PROGRAM PROPERTY VALUE "${_xcrun_out}")
  12. endif()
  13. endif()