diff options
| author | Anatoliy Bulukin | 2015-01-30 15:49:22 +0300 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-06 08:42:41 +0000 |
| commit | d3cec6dc80a690d5579abdc7fcabf53d129d3d3a (patch) | |
| tree | 52211cc63103bb16899622a6c5e83b8d8ab8928f /Library | |
| parent | ab47508f0491a0acbce51a60ffd8da87991fd82a (diff) | |
| download | homebrew-d3cec6dc80a690d5579abdc7fcabf53d129d3d3a.tar.bz2 | |
metashell 2.0.0 (new formula)
Interactive template metaprogramming shell for c++
Closes #36378.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/metashell.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Library/Formula/metashell.rb b/Library/Formula/metashell.rb new file mode 100644 index 000000000..f4c3846ce --- /dev/null +++ b/Library/Formula/metashell.rb @@ -0,0 +1,33 @@ +class Metashell < Formula + homepage "https://github.com/sabel83/metashell" + url "https://github.com/sabel83/metashell/archive/v2.0.0.tar.gz" + sha1 "4dec47b6ee32cdf179b2eb297c289b296d3fba8f" + + depends_on "cmake" => :build + + needs :cxx11 + + def install + ENV.cxx11 + # Build internal Clang + mkdir "templight/build" do + system "cmake", "../llvm", "-DLIBCLANG_BUILD_STATIC=ON", *std_cmake_args + system "make", "clang" + system "make", "libclang" + system "make", "libclang_static" + end + + mkdir "build" do + system "cmake", "..", *std_cmake_args + system "make", "install" + end + end + + test do + (testpath/"test.hpp").write <<-EOS.undent + template <class T> struct add_const { using type = const T; }; + add_const<int>::type + EOS + assert_match /const int/, shell_output("cat #{testpath}/test.hpp | #{bin}/metashell -H") + end +end |
