Skip to content

Commit 73f2070

Browse files
Add CMake script and batch file to download Windows bison dependency
The CMake script downloads and unpacks the ZIP file. The batch file invokes the CMake script and adds the unpacked bin directory to the path. The path addition is necessary because bison expects m4 to be in the path.
1 parent af02f2e commit 73f2070

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

win-get-bison.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cmake -P win-get-bison.cmake
2+
@if errorlevel 1 exit /b 1
3+
set PATH=%PATH%;%CD%\..\bison-2.4.1\bin

win-get-bison.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(ZIP_FILE "../bison-2.4.1.zip")
2+
file(DOWNLOAD "http://user.xmission.com/~legalize/trn/bison-2.4.1.zip" "${ZIP_FILE}"
3+
EXPECTED_MD5 "6d728df45f1cf60f5569da4963322ec3")
4+
file(ARCHIVE_EXTRACT INPUT "${ZIP_FILE}" DESTINATION "../bison-2.4.1")

0 commit comments

Comments
 (0)