diff options
| author | Guo Xiao | 2015-04-24 23:06:36 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-04-26 20:45:44 +0800 |
| commit | 1ce55579ba85495d1bc15e12de0a31adf3174865 (patch) | |
| tree | 450a94b41747d076c02117c859e1050384841a81 | |
| parent | 402b9fb42e58879afdec86dcf4ecd085114dbb39 (diff) | |
| download | homebrew-1ce55579ba85495d1bc15e12de0a31adf3174865.tar.bz2 | |
rapidjson 1.0.1
Closes #39005.
Signed-off-by: Xu Cheng <xucheng@me.com>
| -rw-r--r-- | Library/Formula/rapidjson.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Library/Formula/rapidjson.rb b/Library/Formula/rapidjson.rb new file mode 100644 index 000000000..c748f12d6 --- /dev/null +++ b/Library/Formula/rapidjson.rb @@ -0,0 +1,23 @@ +class Rapidjson < Formula + homepage "https://miloyip.github.io/rapidjson/" + url "https://github.com/miloyip/rapidjson/archive/v1.0.1.tar.gz" + sha256 "a9003ad5c6384896ed4fd1f4a42af108e88e1b582261766df32d717ba744ee73" + head "https://github.com/miloyip/rapidjson.git" + + option "without-docs", "Don't build documentation" + + depends_on "cmake" => :build + depends_on "doxygen" => :build if build.with? "docs" + + def install + args = std_cmake_args + args << "-DRAPIDJSON_BUILD_DOC=OFF" if build.without? "docs" + system "cmake", ".", *args + system "make", "install" + end + + test do + system ENV.cxx, "#{share}/doc/RapidJSON/examples/capitalize/capitalize.cpp", "-o", "capitalize" + assert_equal '{"A":"B"}', pipe_output("./capitalize", '{"a":"b"}') + end +end |
