diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e6a6462f9..4ce4d50b9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,11 +59,6 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS ON) set(CMAKE_CXX_STANDARD_REQUIRED ON) -find_program(RUBY_EXECUTABLE ruby) -if (NOT RUBY_EXECUTABLE) - message(FATAL_ERROR "Could not find ruby") -endif() - if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") set(IS_RELEASE_BUILD ON) endif() diff --git a/cmake/settings.cmake b/cmake/settings.cmake index ba83773704..979b5e1722 100644 --- a/cmake/settings.cmake +++ b/cmake/settings.cmake @@ -29,6 +29,11 @@ function(enable_settings exe name) ${ARGN} ) + find_program(RUBY_EXECUTABLE ruby) + if (NOT RUBY_EXECUTABLE) + message(FATAL_ERROR "Could not find ruby") + endif() + if(host STREQUAL TOOLCHAIN) set(USE_HOST_GCC "-g") endif()