-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
41 lines (34 loc) · 1.32 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8)
project(MFDataPreparation)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++11 -DNDEBUG -pthread -march=native -ftree-vectorize")
find_package(Boost COMPONENTS serialization program_options system filesystem iostreams)
if(NOT ${Boost_FOUND})
SET(BOOST_ROOT /opt/libs/boost) # default
SET(Boost_NO_SYSTEM_PATHS ON) # force to use own build
find_package(Boost COMPONENTS program_options system filesystem REQUIRED)
endif(NOT ${Boost_FOUND})
if(Boost_FOUND)
message(STATUS "Boost found")
message(STATUS ${Boost_LIBRARIES})
include_directories(${Boost_INCLUDE_DIR})
link_libraries(${Boost_LIBRARIES})
endif(Boost_FOUND)
set(util
util/Base.h
util/FileUtil.h
util/ThreadUtil.h)
set(struct
struct/Rating.h
struct/User.h
struct/Item.h)
add_library(lib SHARED ${util} ${struct})
set_target_properties(lib PROPERTIES LINKER_LANGUAGE CXX)
link_libraries(lib ${Boost_LIBRARIES})
add_executable(lastFM_handler lastFM_handler.cpp)
add_executable(ml100k_handler ml100k_handler.cpp)
add_executable(ml1m_handler ml1m_handler.cpp)
add_executable(ml10m_handler ml10m_handler.cpp)
add_executable(ml20m_handler ml20m_handler.cpp)
add_executable(netflix_handler netflix_handler.cpp)
add_executable(yahoo_handler yahoo_handler.cpp)
add_executable(yelp_handler yelp_handler.cpp)