fix flex & bison bug

This commit is contained in:
ruanshudong 2020-03-31 19:41:05 +08:00
parent 158e08b0c2
commit d0dfcb4e18

View File

@ -8,27 +8,25 @@ aux_source_directory(. DIR_SRCS)
set(DEPENDS_SRC_LIST) set(DEPENDS_SRC_LIST)
set(DEPENDS_LEC_YACC_SRC_LIST) set(DEPENDS_LEC_YACC_SRC_LIST)
# #if(WIN32)
list(APPEND DEPENDS_LEC_YACC_SRC_LIST "tars.lex.cpp") list(APPEND DEPENDS_LEC_YACC_SRC_LIST "tars.lex.cpp")
list(APPEND DEPENDS_LEC_YACC_SRC_LIST "tars.tab.hpp") list(APPEND DEPENDS_LEC_YACC_SRC_LIST "tars.tab.hpp")
list(APPEND DEPENDS_LEC_YACC_SRC_LIST "tars.tab.cpp") list(APPEND DEPENDS_LEC_YACC_SRC_LIST "tars.tab.cpp")
# #endif()
# set(DEPENDS_LEC_YACC_SRC_DIR "${PROJECT_SOURCE_DIR}/tarsGrammar/") set(DEPENDS_LEC_YACC_SRC_DIR "${PROJECT_SOURCE_DIR}/tarsGrammar/")
# set(CURRENT_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") set(CURRENT_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
# foreach(LEC_YACC_SRC ${DEPENDS_LEC_YACC_SRC_LIST}) foreach(LEC_YACC_SRC ${DEPENDS_LEC_YACC_SRC_LIST})
# list(APPEND DEPENDS_SRC_LIST ${CURRENT_SRC_DIR}/${LEC_YACC_SRC}) list(APPEND DEPENDS_SRC_LIST ${CURRENT_SRC_DIR}/${LEC_YACC_SRC})
# add_custom_command( add_custom_command(
# OUTPUT ${CURRENT_SRC_DIR}/${LEC_YACC_SRC} OUTPUT ${CURRENT_SRC_DIR}/${LEC_YACC_SRC}
# WORKING_DIRECTORY ${CURRENT_SRC_DIR}) WORKING_DIRECTORY ${CURRENT_SRC_DIR})
# # COMMAND cp ${DEPENDS_LEC_YACC_SRC_DIR}/${LEC_YACC_SRC} ${CURRENT_SRC_DIR} # COMMAND cp ${DEPENDS_LEC_YACC_SRC_DIR}/${LEC_YACC_SRC} ${CURRENT_SRC_DIR}
# # COMMENT "cp ${DEPENDS_LEC_YACC_SRC_DIR}/${LEC_YACC_SRC} ${CURRENT_SRC_DIR}") # COMMENT "cp ${DEPENDS_LEC_YACC_SRC_DIR}/${LEC_YACC_SRC} ${CURRENT_SRC_DIR}")
# endforeach() endforeach()
add_library(${TARGETNAME} ${DIR_SRCS} ${DEPENDS_SRC_LIST}) add_library(${TARGETNAME} ${DIR_SRCS} ${DEPENDS_SRC_LIST})