summaryrefslogtreecommitdiffstats
path: root/Tests/FindRuby/Test/CMakeLists.txt
blob: dcf3ec36a96a3a7ab72599f464d963762cd20fda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cmake_minimum_required(VERSION 3.17)
project(TestRuby LANGUAGES C)
include(CTest)

find_package(Ruby 1.9.9 REQUIRED)
if (NOT Ruby_FOUND)
  message (FATAL_ERROR "Failed to find Ruby >=1.9.9")
endif()

add_executable(ruby_version ruby_version.c)
target_include_directories(ruby_version PRIVATE ${Ruby_INCLUDE_DIRS})
target_link_libraries(ruby_version PRIVATE ${Ruby_LIBRARIES})

add_test(NAME ruby_version COMMAND ruby_version)