Skip to content

Commit

Permalink
topology2/cmake: stricter if execute_process(alsatplg --version ...)
Browse files Browse the repository at this point in the history
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 308a24a ("topology2: Add build support")

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb authored and lgirdwood committed Oct 23, 2023
1 parent 9e0f7ee commit ec1cfd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/topology/topology2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit ec1cfd8

Please sign in to comment.