-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
35 lines (27 loc) · 1.46 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
cmake_minimum_required(VERSION 3.10)
# set the project name
project(MemoryBalancer)
# add the executable
file(GLOB_RECURSE SOURCES src/*.hpp src/*.cpp)
add_executable(MemoryBalancer ${SOURCES})
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_STANDARD 17)
# somehow this does not work. add flag manually
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -L /usr/local/Cellar/boost/1.75.0_2/lib -g -DV8_COMPRESS_POINTERS")
include_directories(/usr/local/Cellar/boost/1.75.0_2/include)
include_directories(/Users/pavpan/Dropbox/Work/MemoryBalancer/third_party/json/nlohmann/include)
include_directories(third_party/cxxopts/include)
include_directories(third_party/cpp-text-table)
target_link_libraries(MemoryBalancer PRIVATE pthread)
target_link_libraries(MemoryBalancer PRIVATE boost_system)
target_link_libraries(MemoryBalancer PRIVATE boost_filesystem)
target_link_libraries(MemoryBalancer PRIVATE stdc++fs)
target_link_libraries(MemoryBalancer PRIVATE v8_monolith)
target_link_directories(MemoryBalancer PRIVATE ../v8/src/out.gn/x64.release.sample/obj/)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wl,--no-as-needed -ldl")
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(third_party/json)
target_link_libraries(MemoryBalancer PRIVATE nlohmann_json::nlohmann_json)
# the project must need v8 as header to build. we dont necessarily need to link it, unless we want simulator.
include_directories(../v8/src/include)
include_directories(/Users/pavpan/src/v8/src/include)