-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake and C89 #11
base: master
Are you sure you want to change the base?
CMake and C89 #11
Conversation
…with Makefile for bison/flex
Taking a look rn. |
part of it is that you added the files generated by flex and bison in gitignore. |
@fennecdjay So I use your flex and bison files to generate, see: find_package(BISON)
find_package(FLEX)
BISON_TARGET(MyParser
gwion.y
"${CMAKE_CURRENT_SOURCE_DIR}/parser.c"
DEFINES_FILE "${CMAKE_SOURCE_DIR}/include/lexer.h"
# COMPILE_FLAGS "-Wno-yacc"
)
FLEX_TARGET(MyScanner
gwion.l
"${CMAKE_CURRENT_SOURCE_DIR}/lexer.c"
COMPILE_FLAGS "--header-file=${CMAKE_SOURCE_DIR}/include/lexer.h")
ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser) The generated files, depending on the version, will have absolute paths inside (e.g., on my macOS Xcode version), or special workarounds (Windows). Anyway I get an error when this runs. Here are the cmake docs for the command: |
re reading this PR, I think should avoid generating from the .y and .l file. |
@fennecdjay Which version of flex and bison are you using? From
|
|
Okay I can just switch to: find_package(BISON 3.7.2 REQUIRED)
find_package(FLEX 2.6.4 REQUIRED) …and use vcpkg or some sort of system package manager (that's actually up-to-date) |
closed as inactive |
WiP
@fennecdjay Can you take a look? - Getting some errors…