I'm trying to build a git project I've cloned which use CMake for compilation and needs bison and flex. I'm using windows 10 and Clion IDE.
I've download Win flex-bison from https://sourceforge.net/projects/winflexbison/ but I can't understand how do I point the CMake to look in the win_flex_bison files I've downloaded.
at the moment the build fails on lines:
find_program(BISON_EXECUTABLE bison)
if(NOT EXISTS ${BISON_EXECUTABLE})
message("Could not find bison executable.")
endif(NOT EXISTS ${BISON_EXECUTABLE})
find_program(FLEX_EXECUTABLE flex)
if(NOT EXISTS ${FLEX_EXECUTABLE})
message("Could not find flex executable.")
endif(NOT EXISTS ${FLEX_EXECUTABLE})
IF (DEFINED FLEXLEXER_H_DIR)
include_directories(${FLEXLEXER_H_DIR})
message("Looking in ${CMAKE_REQUIRED_INCLUDES} for FlexLexer.h")
ELSE()
CHECK_INCLUDE_FILE_CXX("FlexLexer.h" HAVE_FLEXLEXER_H)
IF(NOT HAVE_FLEXLEXER_H)
UNSET(HAVE_FLEXLER_H CACHE)
message( FATAL_ERROR "Cannot find FlexLexer.h. Set FLEXLEXER_H_DIR to point to where it is to be found.." )
ENDIF()
that massages I'm getting are:
Could not find bison executable.
Could not find flex executable.
-- Looking for C++ include FlexLexer.h
-- Looking for C++ include FlexLexer.h - not found
CMake Error at VALfiles/parsing/CMakeLists.txt:28 (message):
Cannot find FlexLexer.h. Set FLEXLEXER_H_DIR to point to where it is to be
found..
-- Configuring incomplete, errors occurred!