diff --git a/CMakeLists.txt b/CMakeLists.txt index d4ac0716daf..c786770bee4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -812,6 +812,10 @@ if(CONFIG_ARM AND CONFIG_USERSPACE) ) add_custom_target(priv_stacks DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${PRIV_STACKS}) + if(${GPERF} STREQUAL GPERF-NOTFOUND) + message(FATAL_ERROR "Unable to find gperf") + endif() + # Use gperf to generate C code (PRIV_STACKS_OUTPUT_SRC_PRE) which implements a # perfect hashtable based on PRIV_STACKS add_custom_command( diff --git a/cmake/host-tools.cmake b/cmake/host-tools.cmake index 6858f2f3f82..3bd3e4fd9c3 100644 --- a/cmake/host-tools.cmake +++ b/cmake/host-tools.cmake @@ -75,13 +75,11 @@ if(${CMAKE_MATCH_1} VERSION_LESS ${MIN_DTC_VERSION}) endif() endif(DTC) +# gperf is an optional dependency find_program( GPERF gperf ) -if(${GPERF} STREQUAL GPERF-NOTFOUND) - message(FATAL_ERROR "Unable to find gperf") -endif() # openocd is an optional dependency find_program(