# #Bison compiler-compiler #3.0.4 # if (WIN32) #Building bison from source using Visual Studio is a hopeless case. #Bison is deeply infected with GNU folklore. #Install from a binary distribution instead. ExternalProject_Add ( bison PREFIX ${CMAKE_INSTALL_PREFIX} BUILD_IN_SOURCE 1 URL http://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip URL_MD5 c32b74a34d91cbdbaecff8390669ae72 UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX= -P ${CMAKE_CURRENT_LIST_DIR}/install.cmake ) endif (WIN32) if (UNIX) #Rely on manual installation via the package manager #You can then invoke bison as /usr/bin/bison #sudo apt-get -q -y install bison ExternalProject_Add ( flex PREFIX ${CMAKE_INSTALL_PREFIX} BUILD_IN_SOURCE 1 DOWNLOAD_COMMAND "" UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND /usr/bin/bison --version INSTALL_COMMAND "" ) endif (UNIX)