Skip to content

Commit 1a10b26

Browse files
committed
Add some hints for finding bison on its usual locations on Windows.
1 parent 2dd8a73 commit 1a10b26

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: build-{build}~branch-{branch}
33
before_build:
44
- md %APPVEYOR_BUILD_FOLDER%\win_build
55
- cd %APPVEYOR_BUILD_FOLDER%\win_build
6-
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0 -DBISON_EXECUTABLE=C:\cygwin\bin\bison
6+
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0
77

88
build:
99
project: win_build\MySQL.sln

cmake/bison.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
2020
SET(BISON_EXECUTABLE /opt/csw/bin/bison)
2121
ENDIF()
2222
ENDIF()
23-
FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
23+
IF(WIN32)
24+
SET(BISON_PATH_HINTS
25+
HINTS
26+
C:/gnuwin32/bin
27+
C:/cygwin64/bin
28+
C:/cygwin/bin)
29+
ENDIF()
30+
FIND_PROGRAM(BISON_EXECUTABLE bison
31+
${BISON_PATH_HINTS}
32+
DOC "path to the bison executable")
2433
MARK_AS_ADVANCED(BISON_EXECUTABLE "")
2534
IF(NOT BISON_EXECUTABLE)
2635
MESSAGE("Warning: Bison executable not found in PATH")

0 commit comments

Comments
 (0)