title: How to build C++ CMake project using Clion with flex and bison
body: <p>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.</p>
  <p>I've download Win flex-bison from <a href="https://sourceforge.net/projects/winflexbison/" rel="nofollow noreferrer">https://sourceforge.net/projects/winflexbison/</a>
  but I can't understand how do I point the CMake to look in the win_flex_bison files I've downloaded.</p>
  <p>at the moment the build fails on lines:</p>
  <pre><code>find_program(BISON_EXECUTABLE bison)
  
  if(NOT EXISTS ${BISON_EXECUTABLE})
      message(&quot;Could not find bison executable.&quot;)
  endif(NOT EXISTS ${BISON_EXECUTABLE})
  
  
  find_program(FLEX_EXECUTABLE flex)
  
  if(NOT EXISTS ${FLEX_EXECUTABLE})
          message(&quot;Could not find flex executable.&quot;)
  endif(NOT EXISTS ${FLEX_EXECUTABLE})
  
  IF (DEFINED FLEXLEXER_H_DIR)
    include_directories(${FLEXLEXER_H_DIR})
    message(&quot;Looking in ${CMAKE_REQUIRED_INCLUDES} for FlexLexer.h&quot;)
  ELSE()
  
  CHECK_INCLUDE_FILE_CXX(&quot;FlexLexer.h&quot; HAVE_FLEXLEXER_H)
  IF(NOT HAVE_FLEXLEXER_H)
    UNSET(HAVE_FLEXLER_H CACHE)
    message( FATAL_ERROR &quot;Cannot find FlexLexer.h.  Set FLEXLEXER_H_DIR to point to where it is to be found..&quot; )
  ENDIF()
  </code></pre>
  <p>that massages I'm getting are:</p>
  <pre><code>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!
  </code></pre>