blob: c232e64e9c038c144f54851dd024b71ecbe40b93 (
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
50
51
|
#
# 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_library(Types src/Types.h src/Types.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)
|