mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
fix flex & bison bug
This commit is contained in:
parent
158e08b0c2
commit
d0dfcb4e18
@ -8,27 +8,25 @@ aux_source_directory(. DIR_SRCS)
|
||||
set(DEPENDS_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.tab.hpp")
|
||||
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(
|
||||
# OUTPUT ${CURRENT_SRC_DIR}/${LEC_YACC_SRC}
|
||||
# WORKING_DIRECTORY ${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}")
|
||||
add_custom_command(
|
||||
OUTPUT ${CURRENT_SRC_DIR}/${LEC_YACC_SRC}
|
||||
WORKING_DIRECTORY ${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}")
|
||||
|
||||
# endforeach()
|
||||
endforeach()
|
||||
|
||||
add_library(${TARGETNAME} ${DIR_SRCS} ${DEPENDS_SRC_LIST})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user