Skip to content

Commit

Permalink
Merge pull request #13 from YuWei-CH/new-graph
Browse files Browse the repository at this point in the history
Some progress on the Graphing making task
  • Loading branch information
waynewangyuxuan authored Oct 28, 2024
2 parents 36f9f12 + fa0be05 commit d29af1d
Show file tree
Hide file tree
Showing 30 changed files with 412 additions and 2,854 deletions.
39 changes: 39 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,45 @@ else()
endif()
target_include_directories(libninja-re2c PRIVATE src)

# --- Create shared library ---
add_library(libninja_shared SHARED
src/build_log.cc
src/build.cc
src/clean.cc
src/clparser.cc
src/dyndep.cc
src/dyndep_parser.cc
src/debug_flags.cc
src/deps_log.cc
src/disk_interface.cc
src/edit_distance.cc
src/elide_middle.cc
src/eval_env.cc
src/graph.cc
src/graphviz.cc
src/json.cc
src/line_printer.cc
src/manifest_parser.cc
src/metrics.cc
src/missing_deps.cc
src/parser.cc
src/state.cc
src/status_printer.cc
src/string_piece_util.cc
src/util.cc
src/version.cc
)

# Link re2c library if required
target_link_libraries(libninja_shared PRIVATE libninja-re2c)

# Include directories for the shared library
target_include_directories(libninja_shared PUBLIC ${CMAKE_SOURCE_DIR}/src)

# Set shared library properties
set_target_properties(libninja_shared PROPERTIES OUTPUT_NAME "ninja_shared")


# --- Check for 'browse' mode support
function(check_platform_supports_browse_mode RESULT)
# Make sure the inline.sh script works on this platform.
Expand Down
6 changes: 1 addition & 5 deletions commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ export PATH=$PATH:/home/yuwei/Documents/llvm-project/build/bin
clang-tidy --version


cmake -S . -B build-cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake -S .. -B build-cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build-cmake --target run-clang-tidy


### Hello World Graph
cmake -G "Ninja" -S ..
ninja
ninja -t graph | dot -Tpng -ograph.png
Loading

0 comments on commit d29af1d

Please sign in to comment.