Update ENG-06-View.md (#67)
Replaced deprecated cmake command EXEC_PROGRAM() with execute_process().
parent
dbe13a9ee3
commit
8bf0ddbeff
|
@ -116,11 +116,11 @@ Obviously, it is too inconvenient to manually run the drogon_ctl command every t
|
||||||
FILE(GLOB SCP_LIST ${CMAKE_CURRENT_SOURCE_DIR}/views/*.csp)
|
FILE(GLOB SCP_LIST ${CMAKE_CURRENT_SOURCE_DIR}/views/*.csp)
|
||||||
foreach(cspFile ${SCP_LIST})
|
foreach(cspFile ${SCP_LIST})
|
||||||
message(STATUS "cspFile:" ${cspFile})
|
message(STATUS "cspFile:" ${cspFile})
|
||||||
EXEC_PROGRAM(basename ARGS "-s .csp ${cspFile}" OUTPUT_VARIABLE classname)
|
execute_process(COMMAND basename ARGS "-s .csp ${cspFile}" OUTPUT_VARIABLE classname)
|
||||||
message(STATUS "view classname:" ${classname})
|
message(STATUS "view classname:" ${classname})
|
||||||
add_custom_command(OUTPUT ${classname}.h ${classname}.cc
|
add_custom_command(
|
||||||
COMMAND drogon_ctl
|
OUTPUT ${classname}.h ${classname}.cc
|
||||||
ARGS create view ${cspFile}
|
COMMAND drogon_ctl ARGS create view ${cspFile}
|
||||||
DEPENDS ${cspFile}
|
DEPENDS ${cspFile}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
set(VIEWSRC ${VIEWSRC} ${classname}.cc)
|
set(VIEWSRC ${VIEWSRC} ${classname}.cc)
|
||||||
|
|
Loading…
Reference in New Issue