Navigation Menu

Skip to content

Commit

Permalink
Ensure that flex meets the version requirements
Browse files Browse the repository at this point in the history
fixes #8750
  • Loading branch information
gunnarbeutner committed Mar 16, 2015
1 parent 427196e commit 6155dd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/config/CMakeLists.txt
Expand Up @@ -18,6 +18,10 @@
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)

Expand Down
4 changes: 4 additions & 0 deletions tools/mkclass/CMakeLists.txt
Expand Up @@ -18,6 +18,10 @@
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)
Expand Down

0 comments on commit 6155dd2

Please sign in to comment.