Skip to content

Commit 4ed6c10

Browse files
author
cmdevries
committed
Initial CMake for Linux/GCC only.
This CMake configuration has only been tested on Linux/GCC. It may also work on other platforms with GCC.
1 parent 114a04d commit 4ed6c10

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ EMTree.o
55
*.csv
66
external/install
77
external/build
8+
build/

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cmake_minimum_required (VERSION 2.6)
2+
project (LMW-tree)
3+
4+
# TODO(cdevries): use find_library() instead
5+
include_directories("${CMAKE_SOURCE_DIR}/external/install/include")
6+
link_directories("${CMAKE_SOURCE_DIR}/external/install/lib")
7+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -march=native -mtune=native -O2")
8+
add_executable(emtree src/EMTree.cpp)
9+
target_link_libraries(emtree "-ltbb -lboost_timer -lboost_system -lboost_chrono")

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,24 @@ Directory structure:
6363
/external/packages - source packages for external libraries
6464
/external/build - build directory for external libraries
6565
/external/install - installation directory for external libraries
66+
67+
Building
68+
========
69+
70+
Make dependencies using a GNU Makefile (only tested on Linux)
71+
72+
$ cd external
73+
$ make
74+
$ cd ..
75+
76+
We use CMake for making the main project
77+
78+
$ mkdir build
79+
$ cd build
80+
$ cmake ..
81+
$ make
82+
83+
Run the program
84+
85+
$ LD_LIBRARY_PATH=../external/install/lib ./emtree
86+

0 commit comments

Comments
 (0)