m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt18
-rw-r--r--README.md8
-rw-r--r--src/brandes.cc10
4 files changed, 38 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f79e96a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+build/
+debug/
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..44ef223
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.5)
+project(brandes CXX)
+
+option(DEBUG OFF)
+
+if (DEBUG)
+ set(CMAKE_BUILD_TYPE DEBUG)
+else (DEBUG)
+ set(CMAKE_BUILD_TYPE RELEASE)
+endif (DEBUG)
+
+set(CMAKE_CXX_FLAGS "-std=c++14")
+set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g")
+set(CMAKE_CXX_FLAGS_RELASE "-O3")
+
+set(SOURCE_FILES src/brandes.cc)
+
+add_executable(brandes ${SOURCE_FILES})
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5e1930b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+# Brandes's Algorithm
+
+## Running
+
+ mkdir build
+ cd build
+ cmake ..
+ make
diff --git a/src/brandes.cc b/src/brandes.cc
new file mode 100644
index 0000000..7e8870d
--- /dev/null
+++ b/src/brandes.cc
@@ -0,0 +1,10 @@
+#include <cstdio>
+
+int main(int argc, char *argv[]) {
+ if (argc < 4) {
+ fprintf(stderr, "USAGE: ./brandes <number-threads> <input-file> <output-file>\n");
+ return 1;
+ }
+
+ return 0;
+}