# HG changeset patch # User Akos Ladanyi # Date 2008-04-13 13:22:52 # Node ID 96f81c791f0cadaff3c8f87870034edbad630bb7 # Parent 483bc6ed7292c108f14489f72f2f3361e7b2f6be CMake based build system diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -34,3 +34,8 @@ ^objs.*/.* ^test/[a-z_]*$ ^demo/.*_demo$ +^build/.* +CMakeFiles +DartTestfile.txt +cmake_install.cmake +CMakeCache.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +project (LEMON) +enable_testing () +add_subdirectory (lemon) +add_subdirectory (demo) +add_subdirectory (test) diff --git a/benchmark/Makefile b/benchmark/Makefile deleted file mode 100644 --- a/benchmark/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - $(MAKE) -C .. diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/demo/CMakeLists.txt @@ -0,0 +1,13 @@ +include_directories (${LEMON_SOURCE_DIR}) + +link_directories (${LEMON_BINARY_DIR}/lemon) + +set (DEMOS + arg_parser_demo + graph_to_eps_demo + lgf_demo) + +foreach (DEMO_NAME ${DEMOS}) + add_executable (${DEMO_NAME} ${DEMO_NAME}.cc) + target_link_libraries (${DEMO_NAME} lemon) + endforeach (DEMO_NAME) diff --git a/demo/Makefile b/demo/Makefile deleted file mode 100644 --- a/demo/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - $(MAKE) -C .. diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 --- a/doc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - $(MAKE) -C .. diff --git a/lemon/CMakeLists.txt b/lemon/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/lemon/CMakeLists.txt @@ -0,0 +1,2 @@ +include_directories (${LEMON_SOURCE_DIR}) +add_library (lemon arg_parser.cc base.cc color.cc random.cc) diff --git a/lemon/Makefile b/lemon/Makefile deleted file mode 100644 --- a/lemon/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - $(MAKE) -C .. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,24 @@ +include_directories (${LEMON_SOURCE_DIR}) + +link_directories (${LEMON_BINARY_DIR}/lemon) + +set (TESTS + bfs_test + counter_test + dfs_test + digraph_test + dim_test + error_test + graph_test + kruskal_test + maps_test + random_test + path_test + time_measure_test + unionfind_test) + +foreach (TEST_NAME ${TESTS}) + add_executable (${TEST_NAME} ${TEST_NAME}.cc) + target_link_libraries (${TEST_NAME} lemon) + add_test(${TEST_NAME} ${TEST_NAME}) +endforeach (TEST_NAME) diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 --- a/test/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - $(MAKE) -C .. diff --git a/tools/Makefile b/tools/Makefile deleted file mode 100644 --- a/tools/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - $(MAKE) -C ..