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