]> granicus.if.org Git - icinga2/commitdiff
Ensure that flex meets the version requirements
authorGunnar Beutner <gunnar@beutner.name>
Sun, 15 Mar 2015 20:08:06 +0000 (21:08 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Sun, 15 Mar 2015 20:08:06 +0000 (21:08 +0100)
fixes #8750

lib/config/CMakeLists.txt
tools/mkclass/CMakeLists.txt

index 52cbf5640ef738afd4f3141c03972dfad7b68b65..9b38981e559447ec2a12af67fda24888b6905bcb 100644 (file)
 find_package(BISON 2.3.0 REQUIRED)
 find_package(FLEX 2.5.31 REQUIRED)
 
+if("${FLEX_VERSION}" VERSION_LESS "2.5.31")
+    message(SEND_ERROR "Your version of flex is too old. You can specify an alternative path using -DFLEX_EXECUTABLE=/path/to/flex")
+endif()
+
 bison_target(config_parser config_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc)
 set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc PROPERTY EXCLUDE_UNITY_BUILD TRUE)
 
index a94c6046d568d0249740508978c21fc20777b565..e5beb13b6f17b6bb63a2bc631f0744d91d7febc8 100644 (file)
 find_package(BISON 2.3.0 REQUIRED)
 find_package(FLEX 2.5.31 REQUIRED)
 
+if("${FLEX_VERSION}" VERSION_LESS "2.5.31")
+    message(SEND_ERROR "Your version of flex is too old. You can specify an alternative path using -DFLEX_EXECUTABLE=/path/to/flex")
+endif()
+
 bison_target(class_parser class_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/class_parser.cc)
 flex_target(class_lexer class_lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/class_lexer.cc)
 add_flex_bison_dependency(class_lexer class_parser)