Unverified Commit 05a4fbef authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

fix the op list generator script (#1049)

* fix the op list generator script
parent 28235f95
...@@ -142,13 +142,16 @@ set (SRC ...@@ -142,13 +142,16 @@ set (SRC
cpio.cpp cpio.cpp
) )
message(STATUS ${CMAKE_CURRENT_SOURCE_DIR}/ops) message(STATUS ${CMAKE_CURRENT_SOURCE_DIR}/op)
file(GLOB_RECURSE OPS "${CMAKE_CURRENT_SOURCE_DIR}/ops" "${CMAKE_CURRENT_SOURCE_DIR}/ops/*.hpp") file(GLOB OPS "${CMAKE_CURRENT_SOURCE_DIR}/op" "${CMAKE_CURRENT_SOURCE_DIR}/op/*.hpp")
foreach(OP ${OPS}) foreach(OP ${OPS})
file(STRINGS ${OP} OP_CLASS REGEX "class [A-Za-z0-9_]+ :") file(STRINGS ${OP} OP_CLASS REGEX "class [A-Za-z0-9_]+ :")
foreach(LINE ${OP_CLASS}) foreach(LINE ${OP_CLASS})
string(REGEX REPLACE ".*class ([A-Za-z0-9_]+) : public ([A-Za-z0-9_]+).*" "\\1:\\2" CLASS_FOUND ${LINE}) string(REGEX REPLACE ".*class ([A-Za-z0-9_]+) : public ([A-Za-z0-9_]+).*" "\\1" CLASS_FOUND ${LINE})
set(OP_CLASS_LIST ${OP_CLASS_LIST} ${CLASS_FOUND}) string(REGEX REPLACE ".*class ([A-Za-z0-9_]+) : public ([A-Za-z0-9_]+).*" "\\2" BASE_FOUND ${LINE})
if (NOT ${BASE_FOUND} STREQUAL "std" AND NOT ${CLASS_FOUND} STREQUAL "Op")
set(OP_CLASS_LIST ${OP_CLASS_LIST} ${CLASS_FOUND})
endif()
endforeach(LINE ${OP_CLASS}) endforeach(LINE ${OP_CLASS})
endforeach() endforeach()
message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/ops_list.txt") message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/ops_list.txt")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment