Skip to content

Commit a5609b8

Browse files
committed
Do not apply offload-compile options without runtime
1 parent 57e9dd1 commit a5609b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flang/unittests/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ add_custom_target(FlangUnitTests)
1111
set_target_properties(FlangUnitTests PROPERTIES FOLDER "Flang/Tests")
1212

1313
function(add_flang_unittest_offload_properties target)
14+
# Do not apply runtime properties if not even compiling the runtime.
15+
if (NOT FLANG_INCLUDE_RUNTIME)
16+
return ()
17+
endif ()
18+
1419
# Set CUDA_RESOLVE_DEVICE_SYMBOLS.
1520
if (FLANG_EXPERIMENTAL_CUDA_RUNTIME)
1621
set_target_properties(${target}

0 commit comments

Comments
 (0)