GraphLab: Distributed Graph-Parallel API  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
1: Creating a GraphLab project

To create a GraphLab project, simply create a sub-directory in the graphlabapi/apps/ folder with your project name. For instance, graphlabapi/apps/my_first_app. Within the sub-directory, create a text file called CMakeLists.txt with the following contents

  project(My_Project)
  add_graphlab_executable(my_first_app my_first_app.cpp)

The project name "My_Project" is an arbitrary name used to identify your application. add_graphlab_executable is a CMake macro that will compile a program called my_first_app using the CPP file my_first_app.cpp, and linking in all GraphLab libraries and dependencies.

If your program needs multiple CPP files simply append to the list. For instance:

  add_graphlab_executable(my_first_app my_first_app.cpp tools.cpp stuff.cpp)

will compile and link 3 cpp files together into a single program.

For more complex uses of CMake, see the Cmake documentation here.

In the next section, we will implement "Hello World".