Skip to content

Commit

Permalink
fix(graphviz): Add missing options (and defaults)
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
  • Loading branch information
GordonSmith committed Sep 18, 2021
1 parent 73e3b16 commit f14588b
Show file tree
Hide file tree
Showing 6 changed files with 812 additions and 222 deletions.
34 changes: 34 additions & 0 deletions cpp/graphviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,40 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
)

option(enable_ltdl "Support on-demand plugin loading" OFF)
option(with_expat "Support HTML-like labels through expat" ON )
option(with_digcola "DIGCOLA features in neato layout engine" ON )
option(with_ipsepcola "IPSEPCOLA features in neato layout engine (disabled by default - C++ portability issues)." OFF )
option(with_ortho "ORTHO features in neato layout engine." ON )
option(with_sfdp "sfdp layout engine." ON )
option(with_smyrna "SMYRNA large graph viewer (disabled by default - experimental)" OFF)
option(with_zlib "Support raster image compression through zlib" OFF)
option(use_sanitizers "enables using address and undefined behavior sanitizer" OFF)
option(use_coverage "enables analyzing code coverage" OFF)
option(with_cxx_api "enables building the C++ API" OFF)
option(with_cxx_tests "enables building the C++ tests" OFF)

if (with_digcola)
add_definitions(-DDIGCOLA)
endif (with_digcola)

if (with_ipsepcola)
add_definitions(-DIPSEPCOLA)
endif (with_ipsepcola)

if (with_ortho)
add_definitions(-DORTHO)
endif (with_ortho)

if (with_sfdp)
add_definitions(-DSFDP)
endif (with_sfdp)

if (with_smyrna)
# TODO include dependency checks
add_definitions(-DSMYRNA)
endif (with_smyrna)

ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(plugin)
ADD_SUBDIRECTORY(graphvizlib)
182 changes: 26 additions & 156 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"purge-jsdelivr": "node ./utils/purge-jsdelivr.js"
},
"devDependencies": {
"@rollup/plugin-alias": "^3.1.2",
"@rollup/plugin-alias": "^3.1.5",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
Expand All @@ -89,7 +89,7 @@
"rollup": "^2.56.3",
"rollup-plugin-sourcemaps": "^0.6.3",
"run-script-os": "^1.1.6",
"standard-version": "^9.3.0",
"standard-version": "^9.3.1",
"terser": "^5.7.2",
"tslib": "^2.3.1",
"typescript": "^4.4.2"
Expand Down
63 changes: 63 additions & 0 deletions src/__tests__/dot001.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
export const dot = `
digraph G {
node [shape=rect];
subgraph cluster_0 {
style=filled;
color=lightgrey;
node [style=filled,color=white];
a0 -> a1 -> a2 -> a3;
label = "process #1";
}
subgraph cluster_1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #2";
color=blue
}
start -> a0;
start -> b0;
a1 -> b3;
b2 -> a3;
a3 -> a0;
a3 -> end;
b3 -> end;
start [shape=Mdiamond];
end [shape=Msquare];
}
`;

export const badDot = `
digraph G {
node [shape=rect];
subgraph cluster_0 {
style=filled;
color=lightgrey;
node [style=filled,color=white];
a0 -> a1 -> a2 -> a3;
label = "process #1";
]
subgraph cluster_1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #2";
color=blue
}
start -> a0;
start -> b0;
a1 -> b3;
b2 -> a3;
a3 -> a0;
a3 -> end;
b3 -> end;
start [shape=Mdiamond];
end [shape=Msquare];
}
`;

0 comments on commit f14588b

Please sign in to comment.