summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-12-18 15:10:33 +0100
committerGitHub <noreply@github.com>2017-12-18 15:10:33 +0100
commit260a962e8373297558af34ee66aafe00fa600cfe (patch)
treed2c5dc90ab9acae98545edb4f858ae00588a769f
parent397a7b99dd58860acfeaa109fe35befa408e9563 (diff)
parentfac2f3fa5f9f421dec251c5dbb0fc60d2e55c0cf (diff)
Merge pull request #4471 from vespa-engine/vekterli/make-flex-bison-outputs-explicit-in-cmakelists
Make Flex and Bison outputs explicit in CMakeLists.txt
-rw-r--r--document/src/vespa/document/select/CMakeLists.txt12
-rw-r--r--document/src/vespa/document/select/grammar/lexer.ll4
-rw-r--r--document/src/vespa/document/select/grammar/parser.yy3
3 files changed, 8 insertions, 11 deletions
diff --git a/document/src/vespa/document/select/CMakeLists.txt b/document/src/vespa/document/select/CMakeLists.txt
index 6dadd35e98a..bc73498622d 100644
--- a/document/src/vespa/document/select/CMakeLists.txt
+++ b/document/src/vespa/document/select/CMakeLists.txt
@@ -1,10 +1,14 @@
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-find_package(BISON REQUIRED)
-find_package(FLEX REQUIRED)
+find_package(BISON REQUIRED 3.0)
+find_package(FLEX REQUIRED 2.5)
-BISON_TARGET(DocSelParser grammar/parser.yy ${CMAKE_CURRENT_BINARY_DIR}/parser.cxx)
-FLEX_TARGET(DocSelLexer grammar/lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/lexer.cxx)
+BISON_TARGET(DocSelParser grammar/parser.yy
+ ${CMAKE_CURRENT_BINARY_DIR}/parser.cxx
+ DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/parser.hxx)
+FLEX_TARGET(DocSelLexer grammar/lexer.ll
+ ${CMAKE_CURRENT_BINARY_DIR}/lexer.cxx
+ DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/lexer.hxx)
ADD_FLEX_BISON_DEPENDENCY(DocSelLexer DocSelParser)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
diff --git a/document/src/vespa/document/select/grammar/lexer.ll b/document/src/vespa/document/select/grammar/lexer.ll
index 8cd5638c122..6483b5e8534 100644
--- a/document/src/vespa/document/select/grammar/lexer.ll
+++ b/document/src/vespa/document/select/grammar/lexer.ll
@@ -1,9 +1,5 @@
/* Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. */
- /* We use the .*xx-suffix to denote a build-time generated file */
-%option outfile="lexer.cxx"
-%option header-file="lexer.hxx"
-
%option c++
/* Uncomment to enable debug tracing of parsing */
/* %option debug */
diff --git a/document/src/vespa/document/select/grammar/parser.yy b/document/src/vespa/document/select/grammar/parser.yy
index baf987355c9..f96bd50378f 100644
--- a/document/src/vespa/document/select/grammar/parser.yy
+++ b/document/src/vespa/document/select/grammar/parser.yy
@@ -1,8 +1,5 @@
/* Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. */
-%output "parser.cxx"
-%defines "parser.hxx"
-
/* Skeleton implementation included as part of the generated source. Note: _not_ covered by the GPL. */
%skeleton "lalr1.cc"