Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made installation work with gpp10+ (version > 10) #633

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/nmatrix/mkmf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def gplusplus_version

raise("unable to determine g++ version (match to get version was nil)") if major.nil? || minor.nil? || patch.nil?

"#{major}.#{minor}.#{patch}"
[major.to_i, minor.to_i, patch.to_i]
end


Expand All @@ -69,14 +69,14 @@ def gplusplus_version
$CXX_STANDARD = 'c++11'
else
version = gplusplus_version
if version < '4.3.0' && CONFIG['CXX'] == 'g++' # see if we can find a newer G++, unless it's been overridden by user
if (version[0] < 4 || version[0] == 4 && version[1] < 3) && CONFIG['CXX'] == 'g++' # see if we can find a newer G++, unless it's been overridden by user
if !find_newer_gplusplus
raise("You need a version of g++ which supports -std=c++0x or -std=c++11. If you're on a Mac and using Homebrew, we recommend using mac-brew-gcc.sh to install a more recent g++.")
end
version = gplusplus_version
end

if version < '4.7.0'
if version[0] < 4 || version[0] == 4 && version[1] < 7
$CXX_STANDARD = 'c++0x'
else
$CXX_STANDARD = 'c++11'
Expand Down