Skip to content

Commit

Permalink
Exclude things defined in test files from subdoc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Oct 2, 2023
1 parent f9fb763 commit 5faab4a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/subdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ jobs:
--out docs \
--include-file-pattern /sus/ \
--exclude-file-pattern /third_party/ \
--exclude-file-pattern /test/ \
--exclude-file-pattern test.cc \
--copy-file subdoc/gen_tests/subdoc-test-style.css \
--copy-file web/logo.png \
--copy-file web/logo32.png \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/try.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ jobs:
--out docs \
--include-file-pattern /sus/ \
--exclude-file-pattern /third_party/ \
--exclude-file-pattern /test/ \
--exclude-file-pattern test.cc \
--copy-file subdoc/gen_tests/subdoc-test-style.css \
--copy-file web/logo.png \
--copy-file web/logo32.png \
Expand Down
7 changes: 7 additions & 0 deletions tools/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Default: true
# * BENCHMARKS=[true|false] to build benchmarks.
# Default: true
# * USE_BREW=[true|false] to use clang/libc++ from homebrew on MacOS.
#
# Requires LLVM:
# * SUBDOC=[true|false] to build subdoc. This requires an LLVM installation.
Expand Down Expand Up @@ -38,6 +39,7 @@ if [[ $LLVM_ROOT == "" ]]; then LLVM_ROOT=$HOME/s/llvm/install; fi
if [[ $USE_ASAN == "" ]]; then USE_ASAN=false; fi
if [[ $USE_LLD == "" ]]; then USE_LLD=false; fi
if [[ $USE_LLVM_CLANG == "" ]]; then USE_LLVM_CLANG=false; fi
if [[ $USE_BREW == "" ]]; then USE_BREW=false; fi

# System detection.
if [[ $OSTYPE == darwin* ]]; then IS_MAC=true; else IS_MAC=false; fi
Expand Down Expand Up @@ -91,6 +93,11 @@ if [[ $IS_MAC == true && $USE_ASAN == true ]]; then
RESOURCE_DIR=$($CLANG --print-resource-dir)
run codesign -f -s - "$RESOURCE_DIR/lib/darwin/libclang_rt.asan_osx_dynamic.dylib"
fi
if [[ $USE_BREW == true ]]; then
set_env CC="/opt/homebrew/opt/llvm/bin/clang"
set_env CXX="/opt/homebrew/opt/llvm/bin/clang++"
set_env LDFLAGS="-L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++ $LDFLAGS"
fi

set_env LLVM_DIR="$LLVM_ROOT/lib/cmake/llvm"
set_env Clang_DIR="$LLVM_ROOT/lib/cmake/clang"
Expand Down
2 changes: 2 additions & 0 deletions tools/run_subdoc.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
out\subdoc\subdoc -p out --out docs ^
--include-file-pattern /sus/ ^
--exclude-file-pattern /third_party/ ^
--exclude-file-pattern /test/ ^
--exclude-file-pattern test.cc ^
--css subdoc-test-style.css ^
--copy-file subdoc/gen_tests/subdoc-test-style.css ^
--copy-file web/logo.png ^
Expand Down
2 changes: 2 additions & 0 deletions tools/run_subdoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
out/subdoc/subdoc -p out --out docs \
--include-file-pattern /sus/ \
--exclude-file-pattern /third_party/ \
--exclude-file-pattern /test/ \
--exclude-file-pattern test.cc \
--css subdoc-test-style.css \
--copy-file subdoc/gen_tests/subdoc-test-style.css \
--copy-file web/logo.png \
Expand Down

0 comments on commit 5faab4a

Please sign in to comment.