Skip to content

Commit e0ee991

Browse files
committed
Error handling seems incorrect, testing a fix
1 parent 8b8fea6 commit e0ee991

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/cmake/Codegen.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ function(gen_selected_ops)
2323
message(STATUS " OPS_FROM_MODEL: ${GEN_OPS_FROM_MODEL}")
2424
message(STATUS " DTYPE_SELECTIVE_BUILD: ${GEN_DTYPE_SELECTIVE_BUILD}")
2525

26-
if(GEN_DTYPE_SELECTIVE_BUILD AND NOT GEN_OPS_FROM_MODEL)
27-
message(FATAL_ERROR " DTYPE_SELECTIVE_BUILD is only support with model API, please pass in a model")
26+
if(GEN_DTYPE_SELECTIVE_BUILD)
27+
if (NOT GEN_OPS_FROM_MODEL)
28+
message(FATAL_ERROR " DTYPE_SELECTIVE_BUILD is only support with model API, please pass in a model")
29+
endif()
2830
endif()
2931

3032
set(_oplist_yaml

0 commit comments

Comments
 (0)