Skip to content

Commit c67d5ba

Browse files
committed
Fix CUDA compilation
1 parent 5739591 commit c67d5ba

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/tests-ubuntu.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,21 @@ jobs:
365365
cmake --build build
366366
rm -rf build
367367
368+
if [ 'xcuda' = 'x${{matrix.backend.name}}' ]
369+
then
370+
export CXX=$Kokkos_ROOT/bin/nvcc_wrapper
371+
fi
372+
368373
cmake \
369374
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON \
370375
-B build \
371376
-S /src/install_test/check_macros
372377
python3 \
373378
/src/install_test/check_macros/check_macros.py \
374-
--db ./build/compile_commands.json \
375379
--with-src /src/install_test/check_macros/with_my_lib.cpp \
376380
--without-src /src/install_test/check_macros/without_my_lib.cpp \
377-
--reference /src/install_test/check_macros/whitelist_macros.json
381+
--reference /src/install_test/check_macros/whitelist_macros.json \
382+
-p ./build
378383
EOF
379384
380385
docker run \

install_test/check_macros/check_macros.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def prepare_commands(args):
9494
Returns:
9595
tuple[set[str], set[str]]: Macros with and without the library
9696
"""
97-
commands = json.loads(args.db.read_text())
97+
commands = json.loads((args.p / "compile_commands.json").read_text())
9898

9999
entry_with = find_entry(commands, args.with_src.resolve())
100100
entry_without = find_entry(commands, args.without_src.resolve())
@@ -202,10 +202,10 @@ def main():
202202
"--reference", required=True, type=Path, help="Reference JSON file with expected macro diff"
203203
)
204204
parser.add_argument(
205-
"--db",
206-
default="build-install-test/compile_commands.json",
205+
"-p",
206+
default="build",
207207
type=Path,
208-
help="Path to compile_commands.json",
208+
help="Path to build directory",
209209
)
210210

211211
args = parser.parse_args()

0 commit comments

Comments
 (0)