From e19ec99e053c1f9ae03c85ef25e0086a239b22ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Mon, 12 Dec 2022 16:33:10 +0000 Subject: [PATCH] Have cmake fail with a fatal error if sql/sql_yacc.h is absent and bison is missing --- cmake/bison.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/bison.cmake b/cmake/bison.cmake index e4113b3fac26..8d60cb951efd 100644 --- a/cmake/bison.cmake +++ b/cmake/bison.cmake @@ -86,8 +86,11 @@ ENDIF() FIND_PACKAGE(BISON) IF(NOT BISON_FOUND) - MESSAGE(WARNING "No bison found!!") - RETURN() + IF(EXISTS sql/sql_yacc.h) + MESSAGE(WARNING "No bison found!!") + ELSE() + MESSAGE(FATAL_ERROR "No bison found!!") + ENDIF() ENDIF() IF(BISON_VERSION VERSION_LESS "2.1")