jonathan-beard / simple_wc_example

simple word count example using flex/bison parser
Apache License 2.0
139 stars 43 forks source link

Alternate fix to the Flex include path problem on MacOS #18

Open guy-middleton opened 2 years ago

guy-middleton commented 2 years ago

Here is another fix to the Flex include path problem on MacOS, assuming use of Flex installed with homebrew:

$ cmake -D CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=/usr/local/opt/flex/include ..
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/guy_middleton/src/simple_wc_example/build
$ make
Consolidate compiler generated dependencies of target my_wc
[ 14%] Building CXX object CMakeFiles/my_wc.dir/main.cpp.o
[ 28%] Building CXX object CMakeFiles/my_wc.dir/mc_driver.cpp.o
[ 42%] Building CXX object CMakeFiles/my_wc.dir/mc_lexer.yy.cc.o
[ 57%] Building CXX object CMakeFiles/my_wc.dir/mc_parser.tab.cc.o
[ 71%] Linking CXX executable my_wc
[100%] Built target my_wc