extpp 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +11 -0
- data/lib/extpp/compiler.rb +14 -1
- data/lib/extpp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ef55c0236ab63ae58504df77564c4f22e9bb909663edc890a4bacd49d0b2160
|
4
|
+
data.tar.gz: f1c81a0659207d423419683fcd3ba0d30f63589cfbbbdfe35921c38f5e2cea2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b58c02a7dfc2e57030a66f736cd09d6cf8f8cef83e8f5c74ae345fde012382fa7ac49817e017a29c4ff0e57b979e3a2f9b6bd722efc0e52d79c956cfd6b89c1
|
7
|
+
data.tar.gz: 6f98a9d19e7c7ff406c200ce442b5fc54667b495e4e0ff3c392d6f7d58a27626cbf0a1cb8ff3cba96f292983ddade0b36ec2d9d43692a2a2b924838317f26355
|
data/doc/text/news.md
CHANGED
data/lib/extpp/compiler.rb
CHANGED
@@ -13,6 +13,7 @@ module ExtPP
|
|
13
13
|
|
14
14
|
def check
|
15
15
|
check_debug_build
|
16
|
+
check_cxx
|
16
17
|
check_version
|
17
18
|
check_warning_flags
|
18
19
|
end
|
@@ -45,6 +46,12 @@ module ExtPP
|
|
45
46
|
end
|
46
47
|
end
|
47
48
|
|
49
|
+
def check_cxx
|
50
|
+
checking_for(checking_message("C++ compiler"), "%s") do
|
51
|
+
RbConfig.expand("$(CXX)")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
48
55
|
def check_version
|
49
56
|
return unless gcc?
|
50
57
|
|
@@ -69,7 +76,7 @@ module ExtPP
|
|
69
76
|
else
|
70
77
|
std = "gnu++17"
|
71
78
|
end
|
72
|
-
when /\AApple LLVM version (\d
|
79
|
+
when /\AApple LLVM version (\d+\.\d+)\.\d/
|
73
80
|
version = Float($1)
|
74
81
|
# TODO: Is it right?
|
75
82
|
if version < 9.0
|
@@ -82,6 +89,12 @@ module ExtPP
|
|
82
89
|
end
|
83
90
|
|
84
91
|
if std
|
92
|
+
if std == "gnu++17"
|
93
|
+
# ruby/intern.h doesn't adapt to C++17. Because it uses
|
94
|
+
# "register" for "rb_mem_clear(register VALUE *mem,
|
95
|
+
# register long size)". C++17 removes "register" keyword.
|
96
|
+
std = "gnu++14"
|
97
|
+
end
|
85
98
|
@cxx_flags += " -std=#{std}"
|
86
99
|
[version, " (#{std})"]
|
87
100
|
else
|
data/lib/extpp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extpp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|