Skip to content

Commit 7c3ef4b

Browse files
committed
Testing new syntax for testing cmake flag ON-OFF
1 parent 7079114 commit 7c3ef4b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tools/cmake/Codegen.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ 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)
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()
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")
3028
endif()
3129

3230
set(_oplist_yaml

0 commit comments

Comments
 (0)