Skip to content

Commit 736d637

Browse files
starseekercshorler
authored andcommitted
Remove MD5 verification logic.
1 parent 6cf5d1e commit 736d637

File tree

3 files changed

+3
-76
lines changed

3 files changed

+3
-76
lines changed

src/express/CMakeLists.txt

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,6 @@ include_directories(
44
${SC_SOURCE_DIR}/src/base
55
)
66

7-
# Set up the information we need to feed the generated source management
8-
# scripts
9-
set(BASELINE_INFORMATION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/generated/verification_info.cmake")
10-
set(PROJECT_CMAKE_DIR "${SC_SOURCE_DIR}/cmake")
11-
set(MD5_FILELIST
12-
"${CMAKE_CURRENT_SOURCE_DIR}/expscan.l"
13-
"${CMAKE_CURRENT_SOURCE_DIR}/expparse.y"
14-
"${CMAKE_CURRENT_SOURCE_DIR}/generated/expscan.c"
15-
"${CMAKE_CURRENT_SOURCE_DIR}/generated/expscan.h"
16-
"${CMAKE_CURRENT_SOURCE_DIR}/generated/expparse.c"
17-
"${CMAKE_CURRENT_SOURCE_DIR}/generated/expparse.h"
18-
)
19-
configure_file(${SC_SOURCE_DIR}/cmake/md5_gen.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/express_md5gen.cmake @ONLY)
20-
configure_file(${SC_SOURCE_DIR}/cmake/md5_verify.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/express_verify.cmake @ONLY)
21-
22-
# Convenience target to generate an updated verification_info.cmake file
23-
add_custom_command(
24-
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/express_md5gen.sentinel
25-
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/express_md5gen.cmake
26-
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/express_md5gen.sentinel
27-
)
28-
add_custom_target(express_md5gen DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/express_md5gen.sentinel)
29-
30-
# Target for actually checking cached MD5 sums against files
31-
add_custom_command(
32-
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/express_verify.sentinel
33-
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/express_verify.cmake
34-
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/express_verify.sentinel
35-
DEPENDS ${MD5_FILELIST}
36-
)
37-
add_custom_target(express_verify DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/express_verify.sentinel)
38-
39-
407
# Depending on whether we're using pre-generated sources or building them on
418
# the fly, set up targets and source lists.
429
if(SC_GENERATE_LP_SOURCES)
@@ -87,6 +54,8 @@ foreach(_src ${EXPRESS_SOURCES})
8754
string(REPLACE "." "_" _suffix ${_src})
8855
set(_objlib "objlib_${_suffix}")
8956
add_library(${_objlib} OBJECT ${_src})
57+
add_dependencies(${_objlib} objlib_expscan_c)
58+
add_dependencies(${_objlib} objlib_expparse_c)
9059
# TODO: probably PIC should be used everywhere...
9160
set_property(TARGET ${_objlib} PROPERTY POSITION_INDEPENDENT_CODE ON)
9261
list(APPEND EXPRESS_OBJS $<TARGET_OBJECTS:${_objlib}>)
@@ -132,28 +101,10 @@ if("$CACHE{SC_BUILD_SHARED_LIBS}" OR NOT "$CACHE{SC_BUILD_STATIC_LIBS}")
132101
if(WIN32)
133102
target_compile_definitions(express PRIVATE SC_EXPRESS_DLL_EXPORTS)
134103
endif()
135-
136-
if(SC_GENERATE_LP_SOURCES)
137-
add_custom_command(TARGET express POST_BUILD
138-
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/express_verify.cmake
139-
)
140-
else()
141-
add_dependencies(express express_verify)
142-
endif()
143-
144104
endif()
145105

146106
if($CACHE{SC_BUILD_STATIC_LIBS})
147107
SC_ADDLIB(express-static STATIC SOURCES "dummy.c" ${EXPRESS_OBJS} LINK_LIBRARIES base-static)
148-
149-
if(SC_GENERATE_LP_SOURCES)
150-
add_custom_command(TARGET express-static POST_BUILD
151-
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/express_verify.cmake
152-
)
153-
else()
154-
add_dependencies(express-static express_verify)
155-
endif()
156-
157108
endif()
158109

159110
SC_ADDEXEC(check-express SOURCES ${CHECK_EXPRESS_SOURCES} LINK_LIBRARIES express base ${SC_EXEC_NOINSTALL})

src/express/generated/README

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,4 @@ lexing and parsing logic.
55

66
DO NOT EDIT THESE FILES. They are machine generated and should not be modified
77
directly - bugs in these files need to be fixed in either the
8-
Perplex/RE2C/Lemon input files or the tools themselves. Directly changing
9-
these files will result in a build failure.
10-
11-
If changes need to be made, the correct approach is:
12-
13-
1. install Perplex, RE2C, and Lemon
14-
2. make any necessary fixes to the input files and/or the generator tools.
15-
3. run the build, and copy the new generated expscan and expparse c and h
16-
files to this directory.
17-
4. run the build target "express_md5gen" to generate a new verification_info.cmake
18-
file, and copy that file into this directory as well.
19-
20-
The verification_info.cmake file in this directory is used by CMake to protect
21-
the integrity of the generated files.
22-
23-
If iterative debugging is necessary, set the cmake configure variable
24-
DEBUGGING_GENERATED_SOURCES to avoid having to update generated sources and md5
25-
sums each time an input file is changed.
8+
Perplex/RE2C/Lemon input files or the tools themselves.

src/express/generated/verification_info.cmake

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)