aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build_options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/build_options.rb')
-rw-r--r--Library/Homebrew/build_options.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb
index ff2e099fc..83afe362e 100644
--- a/Library/Homebrew/build_options.rb
+++ b/Library/Homebrew/build_options.rb
@@ -7,6 +7,7 @@ class BuildOptions
attr_accessor :args
attr_accessor :universal
+ attr_accessor :cxx11
attr_reader :options
protected :options
@@ -25,6 +26,7 @@ class BuildOptions
description ||= case name.to_s
when "universal" then "Build a universal binary"
when "32-bit" then "Build 32-bit only"
+ when "c++11" then "Build using C++11 mode"
end.to_s
@options << Option.new(name, description)
@@ -94,6 +96,11 @@ class BuildOptions
universal || args.include?('--universal') && has_option?('universal')
end
+ # True if the user requested to enable C++11 mode.
+ def cxx11?
+ cxx11 || args.include?('--c++11') && has_option?('c++11')
+ end
+
# Request a 32-bit only build.
# This is needed for some use-cases though we prefer to build Universal
# when a 32-bit version is needed.