Skip to content

Commit

Permalink
Move flex and bison package finding to the main root and check the ve…
Browse files Browse the repository at this point in the history
…rsion of flex for the --header-file, really this is XHP which has this requirement
  • Loading branch information
Scott MacVicar committed Feb 21, 2010
1 parent f88c396 commit 8688583
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 8 additions & 2 deletions CMake/HPHPFindLibs.cmake
Expand Up @@ -157,13 +157,19 @@ FIND_LIBRARY (BINUTIL_LIB iberty)
FIND_LIBRARY (DL_LIB dl)

if (BFD_LIB STREQUAL "BFD_LIB-NOTFOUND")
message(FATAL_ERROR "You need to install binutils")
message(FATAL_ERROR "You need to install binutils")
endif()

if (BINUTIL_LIB STREQUAL "BINUTIL_LIB-NOTFOUND")
message(FATAL_ERROR "You need to install binutils")
message(FATAL_ERROR "You need to install binutils")
endif()

find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

if (${FLEX_VERSION} VERSION_LESS 2.5.33)
message(FATAL_ERROR "Flex is too old, found ${FLEX_VERSION} and we need 2.5.33")
endif()

include_directories(${HPHP_HOME}/src)
include_directories(${HPHP_HOME}/src/lib/system/gen)
Expand Down
3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Expand Up @@ -73,9 +73,6 @@ endforeach(t ${HPHP_EXCLUDE_FILES})

#list(REMOVE_ITEM CXX_SOURCES "${CXX_NOOPT_SOURCES}")

find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

FLEX_TARGET(HphpScanner ${CMAKE_CURRENT_SOURCE_DIR}/cpp/eval/parser/hphp.x ${CMAKE_CURRENT_SOURCE_DIR}/cpp/eval/parser/lex.eval_.cpp COMPILE_FLAGS " -w -i -Peval_")
BISON_TARGET(HphpParser ${CMAKE_CURRENT_SOURCE_DIR}/cpp/eval/parser/hphp.y ${CMAKE_CURRENT_SOURCE_DIR}/cpp/eval/parser/hphp.tab.cpp COMPILE_FLAGS " -v -d -p eval_")
ADD_FLEX_BISON_DEPENDENCY(HphpScanner HphpParser)
Expand Down

0 comments on commit 8688583

Please sign in to comment.