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