diff options
| author | Xiyue Deng | 2013-10-08 23:15:21 -0700 |
|---|---|---|
| committer | Xiyue Deng | 2013-10-27 06:00:52 -0700 |
| commit | 3ba5aa62347dde6c7b3a456e70c9c72c889488a0 (patch) | |
| tree | 8c74ccda97b9c5740428c15871047ce1f0e24ef7 /Library/Formula/boost.rb | |
| parent | 3ec40c062e5b3bdfebc5cbfb36a5766d1d0905d6 (diff) | |
| download | homebrew-3ba5aa62347dde6c7b3a456e70c9c72c889488a0.tar.bz2 | |
boost: support C++11 mode.
* Add info about option renaming: '--with-c++11' -> '--c++11'.
- Require C++ dependencies with C++11 support when requesting '--c++11'.
* Building MPI python support in C++11 mode fails. Disable.
Diffstat (limited to 'Library/Formula/boost.rb')
| -rw-r--r-- | Library/Formula/boost.rb | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb index 3784fef24..b923c2270 100644 --- a/Library/Formula/boost.rb +++ b/Library/Formula/boost.rb @@ -30,14 +30,31 @@ class Boost < Formula option :universal option 'with-icu', 'Build regexp engine with icu support' - option 'with-c++11', 'Compile using Clang, std=c++11 and stdlib=libc++' if MacOS.version >= :lion option 'without-single', 'Disable building single-threading variant' option 'without-static', 'Disable building static library variant' + option 'with-mpi', 'Build with MPI support' + option :cxx11 depends_on :python => :recommended depends_on UniversalPython if build.universal? and build.with? "python" - depends_on "icu4c" if build.with? 'icu' - depends_on :mpi => [:cc, :cxx, :optional] + + if build.with? 'icu' + if build.cxx11? + depends_on 'icu4c' => 'c++11' + else + depends_on 'icu4c' + end + end + + if build.with? 'mpi' + if build.cxx11? + depends_on 'open-mpi' => 'c++11' + else + depends_on :mpi => [:cc, :cxx, :optional] + end + end + + odie 'boost: --with-c++11 has been renamed to --c++11' if build.with? 'c++11' fails_with :llvm do build 2335 @@ -64,7 +81,16 @@ class Boost < Formula EOS end + if build.cxx11? and build.with? 'mpi' and python + raise <<-EOS.undent + Building MPI support for Python using C++11 mode results in + failure and hence disabled. Please don't use this combination + of options. + EOS + end + ENV.universal_binary if build.universal? + ENV.cxx11 if build.cxx11? # Adjust the name the libs are installed under to include the path to the # Homebrew lib directory so executables will work when installed to a @@ -145,11 +171,6 @@ class Boost < Formula args << "link=shared,static" end - if MacOS.version >= :lion and build.with? 'c++11' - args << "cxxflags=-std=c++11" << "cxxflags=-stdlib=libc++" - args << "linkflags=-stdlib=libc++" - end - args << "address-model=32_64" << "architecture=x86" << "pch=off" if build.universal? system "./bootstrap.sh", *bargs |
