Skip to content

Commit 12cf407

Browse files
committed
Remove the ternsary operator in cmake
1 parent 3e069f3 commit 12cf407

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,17 @@ set(PT_LIBS
170170
)
171171

172172
if (${TRITON_PYTORCH_ENABLE_TORCHVISION})
173-
set(PT_LIBS
174-
${PT_LIBS}
175-
${RHEL_BUILD} ? "libtorchvision.so" : "libtorchvision.so.1"
176-
)
173+
if(${RHEL_BUILD})
174+
set(PT_LIBS
175+
${PT_LIBS}
176+
"libtorchvision.so"
177+
)
178+
else()
179+
set(PT_LIBS
180+
${PT_LIBS}
181+
"libtorchvision.so.1"
182+
)
183+
endif()
177184
endif() # TRITON_PYTORCH_ENABLE_TORCHVISION
178185

179186
if (${TRITON_PYTORCH_ENABLE_TORCHTRT})

0 commit comments

Comments
 (0)