summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTim Besard <tim.besard@gmail.com>2011-10-27 16:51:48 +0200
committerTim Besard <tim.besard@gmail.com>2011-10-27 16:51:48 +0200
commit122d27347290ff066635bc3005a332d9574bedb2 (patch)
tree32dfc9e9dfc73503606e85a5f469470486e841ee /CMakeLists.txt
parenta52db2ab61b21fe7721419747b96e1689c9069a0 (diff)
Cleaning up the code a bit.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..3da4838
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,49 @@
+#
+# Project configuration
+#
+
+cmake_minimum_required(VERSION 2.6)
+project(pChase)
+
+set (pChase_VERSION_MAJOR 0)
+set (pChase_VERSION_MINOR 4)
+
+find_package(Threads)
+
+find_library(LIBNUMA numa)
+option(USE_LIBNUMA "Build against NUMA libraries" ON)
+
+
+#
+# Code compilation
+#
+
+add_library(Chain src/Chain.h src/Chain.cpp)
+
+add_library(Experiment src/Experiment.h src/Experiment.cpp)
+
+add_library(Thread src/Thread.h src/Thread.cpp)
+
+add_library(Lock src/Lock.h src/Lock.cpp)
+
+add_library(Output src/Output.h src/Output.cpp)
+
+add_library(Run src/Run.h src/Run.cpp)
+target_link_libraries(Run Lock Chain Thread)
+
+add_library(SpinBarrier src/SpinBarrier.h src/SpinBarrier.cpp)
+
+add_library(Timer src/Timer.h src/Timer.cpp)
+
+add_library(Types src/Types.h src/Types.cpp)
+
+add_executable (pChase src/Main.h src/Main.cpp)
+target_link_libraries(pChase Run Timer Output Experiment SpinBarrier)
+target_link_libraries(pChase ${CMAKE_THREAD_LIBS_INIT})
+if (USE_LIBNUMA)
+ if(LIBNUMA)
+ target_link_libraries(pChase ${LIBNUMA})
+ else ()
+ message(STATUS "WARNING: libnuma not found, not compiling against it")
+ endif ()
+endif ()