Extracted CBot tools
parent
2b84da8a77
commit
510fe6804a
|
@ -38,7 +38,7 @@ class CBotDebug;
|
||||||
* \endcode
|
* \endcode
|
||||||
* the following structure is generated:
|
* the following structure is generated:
|
||||||
* \dot
|
* \dot
|
||||||
* # Generated using the CBot_compile_graph tool
|
* # Generated using the CBot-CompileGraph tool
|
||||||
* # and slightly modified
|
* # and slightly modified
|
||||||
* digraph {
|
* digraph {
|
||||||
* start [label=<START> shape=box3d color=cyan]
|
* start [label=<START> shape=box3d color=cyan]
|
||||||
|
|
|
@ -444,6 +444,10 @@ add_subdirectory(colobot-app)
|
||||||
|
|
||||||
add_subdirectory(po)
|
add_subdirectory(po)
|
||||||
|
|
||||||
|
if(TOOLS)
|
||||||
|
add_subdirectory(tools)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(DESKTOP)
|
if(DESKTOP)
|
||||||
add_subdirectory(desktop)
|
add_subdirectory(desktop)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -5,6 +5,3 @@ set(CMAKE_CXX_FLAGS_DEBUG ${COLOBOT_CXX_FLAGS_DEBUG})
|
||||||
|
|
||||||
# Unit tests
|
# Unit tests
|
||||||
add_subdirectory(unit)
|
add_subdirectory(unit)
|
||||||
|
|
||||||
# CBot tests
|
|
||||||
add_subdirectory(cbot)
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
add_executable(CBot_console console.cpp)
|
|
||||||
target_link_directories(CBot_console PRIVATE
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
)
|
|
||||||
target_link_libraries(CBot_console PRIVATE
|
|
||||||
CBot
|
|
||||||
Colobot-Base # Needed for error strings (TODO: why are they on Colobot side? :/)
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(CBot_compile_graph compile_graph.cpp)
|
|
||||||
target_link_directories(CBot_compile_graph PRIVATE
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
)
|
|
||||||
target_link_libraries(CBot_compile_graph CBot)
|
|
||||||
|
|
||||||
if(COLOBOT_LINT_BUILD)
|
|
||||||
add_fake_header_sources("test/cbot" CBot_console)
|
|
||||||
add_fake_header_sources("test/cbot" CBot_compile_graph)
|
|
||||||
endif()
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
add_subdirectory(cbot-console)
|
||||||
|
add_subdirectory(cbot-graph)
|
|
@ -0,0 +1,13 @@
|
||||||
|
add_executable(CBot-Console
|
||||||
|
src/console.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_directories(CBot-Console PRIVATE
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(CBot-Console PRIVATE
|
||||||
|
CBot
|
||||||
|
Colobot-Base # Needed for error strings (TODO: why are they on Colobot side? :/)
|
||||||
|
)
|
|
@ -0,0 +1,14 @@
|
||||||
|
add_executable(CBot-CompileGraph
|
||||||
|
src/compile_graph.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_directories(CBot-CompileGraph PRIVATE
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(CBot-CompileGraph PRIVATE CBot)
|
||||||
|
|
||||||
|
if(COLOBOT_LINT_BUILD)
|
||||||
|
add_fake_header_sources("test/cbot" CBot-CompileGraph)
|
||||||
|
endif()
|
|
@ -29,13 +29,13 @@
|
||||||
*
|
*
|
||||||
* To generate the graph, pass the output to GraphViz:
|
* To generate the graph, pass the output to GraphViz:
|
||||||
* \code{.sh}
|
* \code{.sh}
|
||||||
* ./CBot_compile_graph < input_file.txt | dot -Tx11
|
* ./CBot-CompileGraph < input_file.txt | dot -Tx11
|
||||||
* \endcode
|
* \endcode
|
||||||
*
|
*
|
||||||
* or for output to file:
|
* or for output to file:
|
||||||
*
|
*
|
||||||
* \code{.sh}
|
* \code{.sh}
|
||||||
* ./CBot_compile_graph < input_file.txt | dot -Tpng -o output.png
|
* ./CBot-CompileGraph < input_file.txt | dot -Tpng -o output.png
|
||||||
* \endcode
|
* \endcode
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue