Skip to content

Commit 62522d7

Browse files
committed
Add lightweight command line processor to jerry-main
Eases command line option and sub-command definition, usage summary and detailed help message printing, and argv processing. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
1 parent f4fbf0b commit 62522d7

File tree

5 files changed

+756
-138
lines changed

5 files changed

+756
-138
lines changed

jerry-main/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ endif()
4343

4444
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_COMMIT_HASH="${JERRY_COMMIT_HASH}")
4545

46-
macro(jerry_create_executable JERRY_NAME SOURCE_JERRY_STANDALONE_MAIN)
47-
add_executable(${JERRY_NAME} ${SOURCE_JERRY_STANDALONE_MAIN})
46+
macro(jerry_create_executable JERRY_NAME)
47+
add_executable(${JERRY_NAME} ${ARGN})
4848
set_property(TARGET ${JERRY_NAME}
4949
PROPERTY LINK_FLAGS "${LINKER_FLAGS_COMMON}")
5050
target_compile_definitions(${JERRY_NAME} PRIVATE ${DEFINES_JERRY})
@@ -57,7 +57,7 @@ endmacro()
5757

5858
# Jerry standalones
5959
if(JERRY_CMDLINE)
60-
jerry_create_executable("jerry" "main-unix.c")
60+
jerry_create_executable("jerry" "main-unix.c" "cli.c")
6161
target_link_libraries("jerry" jerry-ext jerry-port-default)
6262
endif()
6363

0 commit comments

Comments
 (0)