From ec1cfd8f95ac1097fb5636662518ff07e453f39a Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 19 Oct 2023 22:45:28 +0000 Subject: [PATCH] topology2/cmake: stricter if execute_process(alsatplg --version ...) We want to fail if STATUS is not defined, the empty string, the FALSE string or anything unexpected that it is not strictly equal to success code "0". Fixes commit 308a24a92b44 ("topology2: Add build support") Signed-off-by: Marc Herbert --- tools/topology/topology2/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/topology/topology2/CMakeLists.txt b/tools/topology/topology2/CMakeLists.txt index 6abb55262..2ffc16971 100644 --- a/tools/topology/topology2/CMakeLists.txt +++ b/tools/topology/topology2/CMakeLists.txt @@ -4,7 +4,7 @@ add_custom_target(topologies2) # Check alsatplg version and build topology2 if alsatplg version is # 1.2.7 or greater, see https://github.com/thesofproject/sof/issues/5323 execute_process(COMMAND alsatplg --version RESULT_VARIABLE STATUS OUTPUT_VARIABLE ALSA_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) -if(STATUS AND NOT STATUS EQUAL 0) +if(NOT STATUS EQUAL 0) message(WARNING "alsatplg error: ${STATUS}, topology2 will be skipped") else() string(REPLACE "\n" ";" ALSA_VERSION_LIST ${ALSA_VERSION})