Skip to content

Commit 705af92

Browse files
fix: guard MSVC /utf-8 flag to CXX-only for engine_runtime
nvcc treats a bare /utf-8 as a second input file instead of forwarding it to the host compiler, same failure mode already documented for /openmp:experimental above. This only surfaced now because Release 0.5 added .cu sources (istft_cuda_runtime.cu, torch_random_cuda_runtime.cu) to engine_runtime for the first time.
1 parent 7663f48 commit 705af92

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,10 @@ if (ENGINE_ENABLE_OPENMP)
11871187
endif()
11881188

11891189
if (MSVC)
1190-
target_compile_options(engine_runtime PRIVATE /utf-8)
1190+
# Guard on CXX for the same reason as /openmp:experimental above: nvcc
1191+
# treats a bare /utf-8 as a second input file instead of forwarding it
1192+
# to the host compiler, which is fatal for engine_runtime's CUDA sources.
1193+
target_compile_options(engine_runtime PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/utf-8>)
11911194
endif()
11921195

11931196
if (ENGINE_ENABLE_CUDA AND NOT ENGINE_ENABLE_HIP)

0 commit comments

Comments
 (0)