Skip to content

Commit 420f17b

Browse files
Use verbose cmake mode for genderate-docs
This is so that we can see sphinx errors and warnings in the logs. Also modify scripts/gen_docs.py to accept --verbose and --cmake_opts CLI options.
1 parent ed07e5b commit 420f17b

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/generate-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ jobs:
7676
-DCMAKE_CXX_COMPILER:PATH=$(which icpx) \
7777
-DDPCTL_GENERATE_DOCS=ON \
7878
-DDPCTL_ENABLE_DOXYREST=ON \
79-
-DDoxyrest_DIR=`pwd`/doxyrest-2.1.2-linux-amd64
79+
-DDoxyrest_DIR=`pwd`/doxyrest-2.1.2-linux-amd64 \
80+
-DCMAKE_VERBOSE_MAKEFILE=ON
8081
python -c "import dpctl; print(dpctl.__version__)" || exit 1
8182
pushd "$(find _skbuild -name cmake-build)" || exit 1
8283
cmake --build . --target Sphinx || exit 1

scripts/gen_docs.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def run(
2727
compiler_root=None,
2828
bin_llvm=None,
2929
doxyrest_dir=None,
30+
verbose=False,
31+
cmake_opts="",
3032
):
3133
IS_LIN = False
3234

@@ -55,10 +57,16 @@ def run(
5557
"-DDPCTL_GENERATE_DOCS=ON",
5658
]
5759

60+
if verbose:
61+
cmake_args.append("-DCMAKE_VERBOSE_MAKEFILE=ON")
62+
5863
if doxyrest_dir:
5964
cmake_args.append("-DDPCTL_ENABLE_DOXYREST=ON")
6065
cmake_args.append("-DDoxyrest_DIR=" + doxyrest_dir)
6166

67+
if cmake_opts:
68+
cmake_args += cmake_opts.split()
69+
6270
env = dict()
6371
if bin_llvm:
6472
env = {
@@ -126,6 +134,19 @@ def run(
126134
+ "for libsyclinterface"
127135
),
128136
)
137+
driver.add_argument(
138+
"--verbose",
139+
help="Build using vebose makefile mode",
140+
dest="verbose",
141+
action="store_true",
142+
)
143+
driver.add_argument(
144+
"--cmake-opts",
145+
help="Options to pass through to cmake",
146+
dest="cmake_opts",
147+
default="",
148+
type=str,
149+
)
129150

130151
args = parser.parse_args()
131152

@@ -162,4 +183,6 @@ def run(
162183
compiler_root=args.compiler_root,
163184
bin_llvm=args.bin_llvm,
164185
doxyrest_dir=args.doxyrest_root,
186+
verbose=args.verbose,
187+
cmake_opts=args.cmake_opts,
165188
)

0 commit comments

Comments
 (0)