jak-project/goalc/CMakeLists.txt
Tyler Wilding 39658dfd71
docs: Automatically generate documentation from goal_src code (#2214)
This automatically generates documentation from goal_src docstrings,
think doxygen/java-docs/rust docs/etc. It mostly supports everything
already, but here are the following things that aren't yet complete:
- file descriptions
- high-level documentation to go along with this (think pure markdown
docs describing overall systems that would be co-located in goal_src for
organizational purposes)
- enums
- states
- std-lib functions (all have empty strings right now for docs anyway)

The job of the new `gen-docs` function is solely to generate a bunch of
JSON data which should give you everything you need to generate some
decent documentation (outputting markdown/html/pdf/etc). It is not it's
responsibility to do that nice formatting -- this is by design to
intentionally delegate that responsibility elsewhere. Side-note, this is
about 12-15MB of minified json for jak 2 so far :)

In our normal "goal_src has changed" action -- we will generate this
data, and the website can download it -- use the information to generate
the documentation at build time -- and it will be included in the site.
Likewise, if we wanted to include docs along with releases for offline
viewing, we could do so in a similar fashion (just write a formatting
script to generate said documentation).

Lastly this work somewhat paves the way for doing more interesting
things in the LSP like:
- whats the docstring for this symbol?
- autocompleting function arguments
- type checking function arguments
- where is this symbol defined?
- etc

Fixes #2215
2023-02-20 19:49:37 -05:00

71 lines
2.3 KiB
CMake

add_library(compiler
emitter/CallingConvention.cpp
emitter/CodeTester.cpp
emitter/ObjectFileData.cpp
emitter/ObjectGenerator.cpp
emitter/Register.cpp
debugger/disassemble.cpp
build_level/build_level.cpp
build_level/collide_bvh.cpp
build_level/collide_drawable.cpp
build_level/collide_pack.cpp
build_level/color_quantization.cpp
build_level/Entity.cpp
build_level/FileInfo.cpp
build_level/gltf_mesh_extract.cpp
build_level/LevelFile.cpp
build_level/ResLump.cpp
build_level/Tfrag.cpp
build_level/drawable_ambient.cpp
compiler/Compiler.cpp
compiler/Env.cpp
compiler/Val.cpp
compiler/IR.cpp
compiler/CompilerSettings.cpp
compiler/CodeGenerator.cpp
compiler/StaticObject.cpp
compiler/compilation/Asm.cpp
compiler/compilation/Atoms.cpp
compiler/compilation/CompilerControl.cpp
compiler/compilation/ConstantPropagation.cpp
compiler/compilation/Block.cpp
compiler/compilation/Macro.cpp
compiler/compilation/Math.cpp
compiler/compilation/Define.cpp
compiler/compilation/Debug.cpp
compiler/compilation/Function.cpp
compiler/compilation/ControlFlow.cpp
compiler/compilation/Type.cpp
compiler/compilation/State.cpp
compiler/compilation/Static.cpp
compiler/Util.cpp
data_compiler/game_text_common.cpp
data_compiler/dir_tpages.cpp
data_compiler/game_count.cpp
data_compiler/DataObjectGenerator.cpp
debugger/Debugger.cpp
debugger/DebugInfo.cpp
listener/Listener.cpp
listener/MemoryMap.cpp
make/MakeSystem.cpp
make/Tool.cpp
make/Tools.cpp
regalloc/IRegister.cpp
regalloc/Allocator.cpp
regalloc/allocator_interface.cpp
regalloc/Allocator_v2.cpp
compiler/docs/DocTypes.cpp)
target_link_libraries(compiler common Zydis tiny_gltf)
if (WIN32)
target_link_libraries(compiler mman)
endif ()
add_executable(goalc main.cpp)
add_executable(goalc-simple simple_main.cpp)
target_link_libraries(goalc common Zydis compiler sqlite3 SQLiteCpp)
target_link_libraries(goalc-simple common Zydis compiler sqlite3 SQLiteCpp)