woboq_codebrowser 2.0.1 (new formula)
Closes #9692. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
37be0f83cf
commit
7f3c692ac4
1 changed files with 31 additions and 0 deletions
31
Formula/woboq_codebrowser.rb
Normal file
31
Formula/woboq_codebrowser.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
class WoboqCodebrowser < Formula
|
||||
desc "Generate HTML from C++ Code"
|
||||
homepage "https://code.woboq.org/"
|
||||
url "https://github.com/woboq/woboq_codebrowser/archive/2.0.1.tar.gz"
|
||||
sha256 "f2ec67bb49415986a4bbef515024009433756c83e14fa84f5acc40c83eec19e6"
|
||||
|
||||
depends_on "llvm"
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
system "cmake", ".", "-DLLVM_CONFIG_EXECUTABLE=#{Formula["llvm"].opt_bin}/llvm-config", "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", *std_cmake_args
|
||||
system "make"
|
||||
bin.install "indexgenerator/codebrowser_indexgenerator", "generator/codebrowser_generator"
|
||||
prefix.install "data"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<-EOS.undent
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
printf(\"hi!\");
|
||||
}
|
||||
EOS
|
||||
system "#{bin}/codebrowser_generator", "-o=#{Dir.pwd}", "-p", "test:#{Dir.pwd}", "#{Dir.pwd}/test.c", "--", "clang", "#{Dir.pwd}/test.c"
|
||||
assert File.exist? "./test/test.c.html"
|
||||
assert File.exist? "./refs/printf"
|
||||
assert File.exist? "./include/sys/stdio.h.html"
|
||||
assert File.exist? "./fnSearch"
|
||||
assert File.exist? "./fileIndex"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue