Skip to content

Commit 62d4be7

Browse files
committed
auto graphivz w cmake
1 parent 4de040f commit 62d4be7

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

CMakeGraphVizOptions.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set(GRAPHVIZ_GENERATE_PER_TARGET TRUE)
2+
set(GRAPHVIZ_IGNORE_TARGETS test_* unity)

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,9 @@ if(BUILD_PACKAGE)
198198

199199
add_subdirectory(pkg)
200200
endif(BUILD_PACKAGE)
201+
202+
add_custom_target(graphviz ALL
203+
COMMAND ${CMAKE_COMMAND} "--graphviz=dep_chart.dot" .
204+
COMMAND dot -Tpng dep_chart.dot -o dep_chart.png
205+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
206+
)

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ target_include_directories(
5757
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
5858
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/bsl>
5959
)
60-
target_link_libraries(bsl_front PUBLIC MLIB::mlib)
60+
#target_link_libraries(bsl_front PUBLIC MLIB::mlib)
6161

6262
# Dynamic backend library
6363
set(BSL_DYNAMIC_H

src/mock_bpa/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ set_target_properties(bsl_mock_bpa
5454
VERSION ${CMAKE_PROJECT_VERSION}
5555
SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR}
5656
)
57-
target_link_libraries(bsl_mock_bpa PUBLIC bsl_front QCBOR::qcbor)
57+
target_link_libraries(bsl_mock_bpa PUBLIC bsl_front QCBOR::qcbor MLIB::mlib)
5858

5959
add_executable(bsl-mock-bpa)
6060
target_sources(bsl-mock-bpa PRIVATE mock_bpa.c)

0 commit comments

Comments
 (0)