|
| 1 | +git clone https://github.com/ogdf/ogdf.git ogdf |
| 2 | +cd ogdf |
| 3 | +git checkout foxglove-202510 # latest release |
| 4 | +mkdir build-debug build-release |
| 5 | + |
| 6 | +# this already sets most confinguration options to sensible values for ease of development |
| 7 | +# alternatively, change them via `ccmake .` |
| 8 | +cmake -B build-debug -S . \ |
| 9 | + -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug \ |
| 10 | + -DOGDF_MEMORY_MANAGER=POOL_NTS -DOGDF_SEPARATE_TESTS=ON \ |
| 11 | + -DOGDF_USE_ASSERT_EXCEPTIONS=ON \ |
| 12 | + -DOGDF_USE_ASSERT_EXCEPTIONS_WITH_STACK_TRACE=ON_LIBUNWIND |
| 13 | +# if libunwind is not found, install it first or remove the last flag |
| 14 | +# https://pkgs.org/search/?q=libunwind-dev |
| 15 | +cmake --build build-debug --parallel |
| 16 | + |
| 17 | +# the performance-oriented version of the above configuration |
| 18 | +cmake -B build-release -S . \ |
| 19 | + -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 20 | + -DOGDF_MEMORY_MANAGER=POOL_NTS -DOGDF_USE_ASSERT_EXCEPTIONS=OFF \ |
| 21 | + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_POLICY_DEFAULT_CMP0069=NEW |
| 22 | +cmake --build build-release --parallel |
| 23 | + |
| 24 | +cd .. |
| 25 | +mkdir example-project |
| 26 | +# copy the example project |
| 27 | +cp -r ogdf/doc/examples/special/* example-project/ |
| 28 | +cd example-project/ |
| 29 | +mkdir build-debug build-release |
| 30 | + |
| 31 | +# we need to tell cmake the absolute path where our matching ogdf build is located via OGDF_DIR |
| 32 | +cmake -B build-debug -S . \ |
| 33 | + -DCMAKE_BUILD_TYPE=Debug -DOGDF_DIR=$(realpath ../../ogdf/build-debug) |
| 34 | +cmake --build build-debug --parallel |
| 35 | + |
| 36 | +cmake -B build-release -S . \ |
| 37 | + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOGDF_DIR=$(realpath ../../ogdf/build-release) \ |
| 38 | + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_POLICY_DEFAULT_CMP0069=NEW |
| 39 | +cmake --build build-release --parallel |
0 commit comments