Skip to content

Commit c9e1c4c

Browse files
committed
Maybe cmake if condition can't handle complex expansions?
1 parent c2b7ef1 commit c9e1c4c

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)