Skip to content

Commit 8c9b347

Browse files
starseekercshorler
authored andcommitted
Build again w/ the generator tools.
1 parent 22c437d commit 8c9b347

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

cmake/FindLEMON.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,11 @@ if (LEMON_EXECUTABLE)
156156
set(LEMON_${Name}_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}" PARENT_SCOPE)
157157
set(LEMON_${Name}_OUTPUTS "${_out_src_file}" PARENT_SCOPE)
158158

159+
# TODO - remove once perplex goes away...
160+
add_custom_target(${Name} DEPENDS ${_out_hdr_file})
161+
159162
# make sure we clean up generated output and copied input
160-
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${LEMON_${Name}_OUTPUTS}")
163+
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${_out_src_file}")
161164
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_in_y_file}")
162165

163166
endfunction(LEMON_TARGET)

cmake/FindPERPLEX.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ if(NOT COMMAND ADD_PERPLEX_LEMON_DEPENDENCY)
240240
message(SEND_ERROR "PERPLEX target `${PERPLEXTarget}' does not exists.")
241241
endif()
242242

243-
if(NOT LEMON_${LemonTarget}_HDR)
243+
if(NOT TARGET ${LemonTarget})
244244
message(SEND_ERROR "Lemon target `${LemonTarget}' does not exists.")
245245
endif()
246246

247247
set_source_files_properties(${PERPLEX_${PERPLEXTarget}_SRC}
248-
PROPERTIES OBJECT_DEPENDS ${LEMON_${LemonTarget}_HDR})
248+
PROPERTIES OBJECT_DEPENDS ${LEMON_${LemonTarget}_OUTPUT_HEADER})
249249
endmacro(ADD_PERPLEX_LEMON_DEPENDENCY)
250250
endif(NOT COMMAND ADD_PERPLEX_LEMON_DEPENDENCY)
251251

cmake/SC_Regenerate.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if(NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "OFF")
3030
# NOTE: lemon doesn't have a stable versioning system (it's always 1)
3131
find_package(LEMON ${_verbosity})
3232
find_package(RE2C 1.0.3 ${_verbosity})
33+
find_package(PERPLEX ${_verbosity})
3334

3435
if(LEMON_FOUND AND RE2C_FOUND)
3536
set(SC_GENERATE_LP_SOURCES 1)

src/express/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ include_directories(
77
# Depending on whether we're using pre-generated sources or building them on
88
# the fly, set up targets and source lists.
99
if(SC_GENERATE_LP_SOURCES)
10-
LEMON_TARGET(ExpParser expparse.y)
10+
LEMON_TARGET(ExpParser expparse.y expparse.c
11+
COMPILE_FLAGS "-p -c"
12+
DEFINES_FILE "expparse.h"
13+
)
1114
PERPLEX_TARGET(ExpScanner expscan.l)
1215
ADD_PERPLEX_LEMON_DEPENDENCY(ExpScanner ExpParser)
1316

1417
add_library(objlib_expscan_c OBJECT ${PERPLEX_ExpScanner_SRC})
1518
set_property(TARGET objlib_expscan_c PROPERTY POSITION_INDEPENDENT_CODE ON)
1619

17-
add_library(objlib_expparse_c OBJECT ${LEMON_ExpParser_SRC})
20+
add_library(objlib_expparse_c OBJECT ${LEMON_ExpParser_OUTPUTS})
1821
set_property(TARGET objlib_expparse_c PROPERTY POSITION_INDEPENDENT_CODE ON)
1922

2023
else(SC_GENERATE_LP_SOURCES)

0 commit comments

Comments
 (0)