Skip to content

Commit

Permalink
Adding compilation options for flex/lex and bison/yacc
Browse files Browse the repository at this point in the history
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 c873fad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit c873fad

Please sign in to comment.