Skip to content

Commit

Permalink
Update ENG-06-View.md (#67)
Browse files Browse the repository at this point in the history
Replaced deprecated cmake command EXEC_PROGRAM() with execute_process().
  • Loading branch information
aogposton authored Mar 29, 2024
1 parent dbe13a9 commit 8bf0ddb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ENG-06-View.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ Obviously, it is too inconvenient to manually run the drogon_ctl command every t
```cmake
FILE(GLOB SCP_LIST ${CMAKE_CURRENT_SOURCE_DIR}/views/*.csp)
foreach(cspFile ${SCP_LIST})
message(STATUS "cspFile:" ${cspFile})
EXEC_PROGRAM(basename ARGS "-s .csp ${cspFile}" OUTPUT_VARIABLE classname)
message(STATUS "view classname:" ${classname})
add_custom_command(OUTPUT ${classname}.h ${classname}.cc
COMMAND drogon_ctl
ARGS create view ${cspFile}
DEPENDS ${cspFile}
VERBATIM )
set(VIEWSRC ${VIEWSRC} ${classname}.cc)
message(STATUS "cspFile:" ${cspFile})
execute_process(COMMAND basename ARGS "-s .csp ${cspFile}" OUTPUT_VARIABLE classname)
message(STATUS "view classname:" ${classname})
add_custom_command(
OUTPUT ${classname}.h ${classname}.cc
COMMAND drogon_ctl ARGS create view ${cspFile}
DEPENDS ${cspFile}
VERBATIM)
set(VIEWSRC ${VIEWSRC} ${classname}.cc)
endforeach()
```

Expand Down

0 comments on commit 8bf0ddb

Please sign in to comment.