Ruby.cmake 473 B

123456789101112131415161718192021
  1. enable_language(C)
  2. cmake_policy(SET CMP0185 NEW)
  3. set(Ruby_RBENV_EXECUTABLE "") # Suppress rbenv code path for this test.
  4. find_package(Ruby 1.9.9 REQUIRED)
  5. if (NOT Ruby_FOUND)
  6. message (FATAL_ERROR "Failed to find Ruby >=1.9.9")
  7. endif()
  8. foreach(var_CMP0185
  9. RUBY_EXECUTABLE
  10. RUBY_INCLUDE_DIRS
  11. RUBY_LIBRARY
  12. RUBY_VERSION
  13. )
  14. if(DEFINED ${var_CMP0185})
  15. message(FATAL_ERROR "Pre-CMP0185 result variable is set: ${var_CMP0185}")
  16. endif()
  17. endforeach()