From 38f4282359017b4e62ab2118fb6e6ddfa413b767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=82=A3=E5=87=A0?= <2078634206@qq.com> Date: Wed, 30 Sep 2026 13:03:42 +0800 Subject: [PATCH] fix(cmake): correct PFL_ARG prefix typo in conflict check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The conflict check in _pfl_init_produce_auto_argument referenced the non-existent PLF_ARG_* variable prefix, so setting both a project-level variable and the matching PFL_INIT argument silently let the argument overwrite the project variable instead of producing the intended fatal error. Fix the prefix so the intended fatal error triggers. Signed-off-by: 陈那几 <2078634206@qq.com> --- cmake/PFL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/PFL.cmake b/cmake/PFL.cmake index aca423d86..261c3d66b 100644 --- a/cmake/PFL.cmake +++ b/cmake/PFL.cmake @@ -207,7 +207,7 @@ macro(PFL_init) # NOTE: As we might call enable_testing() in `PFL_init`, it have if(auto) macro(_pfl_init_produce_auto_argument NAME DEFAULT) - if(DEFINED ${PROJECT_NAME}_${NAME} AND DEFINED PLF_ARG_${NAME}) + if(DEFINED ${PROJECT_NAME}_${NAME} AND DEFINED PFL_ARG_${NAME}) _pfl_fatal( "You may either define ${PROJECT_NAME}_${NAME} before call PFL_INIT" "or call PFL_INIT with argument ${NAME}.")