diff --git a/cmake/nuttx_add_application.cmake b/cmake/nuttx_add_application.cmake index c670bf00d54..78c27c6e2a8 100644 --- a/cmake/nuttx_add_application.cmake +++ b/cmake/nuttx_add_application.cmake @@ -153,10 +153,7 @@ function(nuttx_add_application) set(SYMBOL_STACKSIZE $<$>:-Wl,>--defsym nx_stacksize=${STACKSIZE}) endif() - if(PRIORITY) - if(PRIORITY STREQUAL "SCHED_PRIORITY_DEFAULT") - set(PRIORITY "0") - endif() + if(PRIORITY AND NOT PRIORITY STREQUAL "SCHED_PRIORITY_DEFAULT") set(SYMBOL_PRIORITY $<$>:-Wl,>--defsym nx_priority=${PRIORITY}) endif()