From 4a3510bbf96e472b6b8219cf7de00c78cd6941cb Mon Sep 17 00:00:00 2001 From: "Troy D. Straszheim" Date: Sat, 24 Jan 2009 18:57:20 +0000 Subject: [PATCH] merge of cmake build files from trunk per beman [SVN r50756] --- CMakeLists.txt | 24 +++++++++++++++++ module.cmake | 3 +++ src/CMakeLists.txt | 26 +++++++++++++++++++ test/CMakeLists.txt | 63 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 module.cmake create mode 100644 src/CMakeLists.txt create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..139abdfc --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,24 @@ +#---------------------------------------------------------------------------- +# This file was automatically generated from the original CMakeLists.txt file +# Add a variable to hold the headers for the library +set (lib_headers + graph +) + +# Add a library target to the build system +boost_library_project( + graph + SRCDIRS src + TESTDIRS test + HEADERS ${lib_headers} + # DOCDIRS + DESCRIPTION "The BGL graph interface and graph components are generic, in the same sense as the the Standard Template Library (STL)." + MODULARIZED + AUTHORS "Jeremy Siek " + "Lie-Quan Lee" + "Andrew Lumsdaine" + "Douglas Gregor " + # MAINTAINERS +) + + diff --git a/module.cmake b/module.cmake new file mode 100644 index 00000000..738381c6 --- /dev/null +++ b/module.cmake @@ -0,0 +1,3 @@ +boost_module(graph DEPENDS property_map tuple multi_index any random) + +# any is there because of the dependency on boost/dynamic_property_map.hpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..786b8173 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,26 @@ +add_definitions(-DBOOST_GRAPH_NO_LIB=1) + +if (MSVC) + # Without these flags, MSVC 7.1 and 8.0 crash + add_definitions(-GR-) +endif (MSVC) + +set(BOOST_GRAPH_OPTIONAL_SOURCES "") +set(BOOST_GRAPH_OPTIONAL_LIBRARIES "") + +# Try to find the Expat library +include(FindEXPAT) +if (EXPAT_FOUND) + # We have Expat, so build the GraphML parser - TODO: Boost 1.34.x only +# set(BOOST_GRAPH_OPTIONAL_SOURCES +# ${BOOST_GRAPH_OPTIONAL_SOURCES} "graphml.cpp") + include_directories(${EXPAT_INCLUDE_DIRS}) + list(APPEND BOOST_GRAPH_OPTIONAL_LIBRARIES ${EXPAT_LIBRARIES}) +endif (EXPAT_FOUND) + +boost_add_library( + boost_graph + read_graphviz_spirit.cpp ${BOOST_GRAPH_OPTIONAL_SOURCES} + LINK_LIBS ${BOOST_GRAPH_OPTIONAL_LIBRARIES} + SHARED_COMPILE_FLAGS "-DBOOST_GRAPH_DYN_LINK=1" + ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 00000000..4ff827db --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,63 @@ +boost_additional_test_dependencies(graph BOOST_DEPENDS test assign) + +boost_test_run(transitive_closure_test) +boost_test_compile(adj_list_cc) +boost_test_run(adj_list_edge_list_set) +boost_test_compile(adj_matrix_cc) +boost_test_run(bfs) +boost_test_compile(bfs_cc) +boost_test_run(bellman-test) +boost_test_run(betweenness_centrality_test DEPENDS boost_graph SHARED) +boost_test_run(csr_graph_test) +boost_test_run(dag_longest_paths) +boost_test_run(dfs) +boost_test_compile(dfs_cc) +boost_test_compile(dijkstra_cc) +boost_test_run(dijkstra_heap_performance ARGS 10000 DEPENDS boost_graph SHARED) +boost_test_run(dominator_tree_test) +boost_test_run(relaxed_heap_test ARGS 5000 15000) +boost_test_compile(edge_list_cc) +boost_test_compile(filtered_graph_cc) +boost_test_run(graph) +boost_test_compile(graph_concepts) +boost_test_run(graphviz_test + DEPENDS boost_test_exec_monitor boost_graph STATIC) +boost_test_run(gursoy_atun_layout_test) +boost_test_run(layout_test) +boost_test_run(serialize DEPENDS boost_serialization) +boost_test_compile(reverse_graph_cc) +boost_test_run(sequential_vertex_coloring) +boost_test_run(subgraph) +boost_test_run(isomorphism) +boost_test_run(adjacency_matrix_test) +boost_test_compile(vector_graph_cc) +boost_test_compile(copy) +boost_test_compile(property_iter) +boost_test_run(bundled_properties) +boost_test_run(floyd_warshall_test) +boost_test_run(astar_search_test) +boost_test_run(biconnected_components_test) +boost_test_run(cuthill_mckee_ordering) +boost_test_run(king_ordering) +boost_test_run(matching_test) +# boost_test_run(max_flow_test) +# boost_test_run(kolmogorov_max_flow_test) TODO: Boost 1.34.x only + +# GraphML Tests - not for Boost 1.34.x +#include(FindEXPAT) +#if (EXPAT_FOUND) +# include_directories(${EXPAT_INCLUDE_DIRS}) +# boost_test_run(graphml_test LIBRARIES boost_graph) +#endif (EXPAT_FOUND) + +# Stanford GraphBase Tests +if ($ENV{SDB}) + include_directories("$ENV{SDB}") + boost_test_compile(stanford_graph_cc) +endif ($ENV{SDB}) + +# LEDA tests +if ($ENV{LEDA}) + include_directories("$ENV{LEDA}/incl") + boost_test_compile(leda_graph_cc) +endif ($ENV{LEDA})