Permalink
Browse files

Adding compilation options for flex/lex and bison/yacc

The pull request #419 didn't work for the ninja build platform
The pull request #442 did only work when cmake was called but not during compilation ("make")

In this patch we set the LEX_FLAGS and YACC_FLAGS when specified on the command line with cmake to the specified value, in the other case these flags are for the Ninja build system they are omitted and for all other build systems they are set to $(LEX_FLAGS) and $(YACC_FLAGS) so they can be used during runtime as well.
  • Loading branch information...
albert-github committed Mar 5, 2016
1 parent 7584c29 commit c873fad0b4c2948551e53c082a3829243c4ccb9f
Showing with 8 additions and 0 deletions.
  1. +8 −0 CMakeLists.txt
@@ -55,6 +55,14 @@ if (WIN32)
add_definitions(-DLIBICONV_STATIC -D_CRT_SECURE_NO_WARNINGS)
endif()
if ("${CMAKE_GENERATOR}" MATCHES "Ninja")
set(LEX_FLAGS )
set(YACC_FLAGS )
else ("${CMAKE_GENERATOR}" MATCHES "Ninja")
set(LEX_FLAGS $(LEX_FLAGS))
set(YACC_FLAGS $(YACC_FLAGS))
endif ("${CMAKE_GENERATOR}" MATCHES "Ninja")
find_program(DOT NAMES dot)
find_package(PythonInterp REQUIRED)
find_package(FLEX REQUIRED)

0 comments on commit c873fad

Please sign in to comment.