MAC yacc/lex CMakeLists.txt Sample
//CMakeLists.txt cmake_minimum_required(VERSION 3.21) project(cns) set(CMAKE_CXX_STANDARD 23) find_package(BISON) find_package(FLEX) BISON_TARGET(MyParser src/test.y ${CMAKE_CURRENT_BINARY_DIR}/test.tab.cpp) FLEX_TARGET(MyScanner src/test.l ${CMAKE_CURRENT_BINARY_DIR}/test.yy.cpp) ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(cns ${BISON_MyParser_OUTPUTS} ${FLEX_MyScanner_OUTPUTS} ) #target_link_libraries(c0 ${FLEX_LIBRARIES}) target_link_libraries(cns -ll)