pvalena / rpms / ruby

Forked from rpms/ruby 2 years ago
Clone
ae55d5
From 51e2c91412a511196e58efea5b87c460b4fa6a20 Mon Sep 17 00:00:00 2001
ae55d5
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
ae55d5
Date: Thu, 26 Jul 2018 13:17:52 +0200
ae55d5
Subject: [PATCH] Avoid need of C++ compiler to pass the test suite.
ae55d5
ae55d5
The test suite fails when C++ compiler is not available on the system:
ae55d5
ae55d5
~~~
ae55d5
TestGemExtCmakeBuilder#test_self_build:
ae55d5
Gem::InstallError: cmake failed, exit code 1
ae55d5
    /builddir/build/BUILD/ruby-2.5.1/lib/rubygems/ext/builder.rb:92:in `run'
ae55d5
    /builddir/build/BUILD/ruby-2.5.1/lib/rubygems/ext/cmake_builder.rb:10:in `build'
ae55d5
    /builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:37:in `block in test_self_build'
ae55d5
    /builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:36:in `chdir'
ae55d5
    /builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:36:in `test_self_build'
ae55d5
~~~
ae55d5
ae55d5
But there is nothing which would realy required C++. It is just CMake
ae55d5
default to check for C++.
ae55d5
---
ae55d5
 test/rubygems/test_gem_ext_cmake_builder.rb | 1 +
ae55d5
 1 file changed, 1 insertion(+)
ae55d5
ae55d5
diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb
ae55d5
index 76d3cb2afe..2d449fc2fd 100644
ae55d5
--- a/test/rubygems/test_gem_ext_cmake_builder.rb
ae55d5
+++ b/test/rubygems/test_gem_ext_cmake_builder.rb
ae55d5
@@ -25,6 +25,7 @@ def test_self_build
ae55d5
     File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
ae55d5
       cmakelists.write <<-eo_cmake
ae55d5
 cmake_minimum_required(VERSION 2.6)
ae55d5
+project(self_build LANGUAGES NONE)
ae55d5
 install (FILES test.txt DESTINATION bin)
ae55d5
       eo_cmake
ae55d5
     end