blob: 6c88c0e5eca6997fc6a92f8c401a3456234ed41e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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)
include_directories(lib)
add_subdirectory(lib/AsmJit)
#
# Code compilation
#
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 Thread)
add_library(SpinBarrier src/SpinBarrier.h src/SpinBarrier.cpp)
add_library(Timer src/Timer.h src/Timer.cpp)
add_executable (chase src/Main.cpp)
target_link_libraries(chase Run Timer Output Experiment SpinBarrier)
target_link_libraries(chase ${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 ()
target_link_libraries(chase AsmJit)
|