-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
29 lines (25 loc) · 1.67 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
cmake_minimum_required(VERSION 2.8.12.2)
project(sat_solver)
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
endmacro(use_cxx11)
use_cxx11()
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
set(SOURCE_FILES src/sequential_main.cpp src/Config.h src/CnfParser.cpp src/Cnf.cpp src/Clause.cpp src/Worker.cpp src/Dpll.cpp src/Exceptions.cpp src/Variable.cpp src/Cdcl.cpp src/CdclDependencyGraph.cpp src/Solver.h src/SolverController.cpp src/ArgParsing.h)
add_executable(sequential_main ${SOURCE_FILES})
target_link_libraries(sequential_main ${MPI_LIBRARIES})
include_directories(${MPI_INCLUDE_PATH})
set(SOURCE_FILES src/parallel_main.cpp src/Meter.h src/Config.h src/CnfParser.cpp src/Cnf.cpp src/Clause.cpp src/Worker.cpp src/SlaveWorker.cpp src/Dpll.cpp src/Exceptions.cpp src/Variable.cpp src/MpiTypes.h src/Model.cpp src/Master.cpp src/Cdcl.cpp src/CdclDependencyGraph.cpp src/Solver.h src/SolverController.cpp src/ArgParsing.h)
add_executable(parallel_main ${SOURCE_FILES})
target_link_libraries(parallel_main ${MPI_LIBRARIES})
include_directories(${MPI_INCLUDE_PATH})
set(SOURCE_FILES src/stealing_parallel_main.cpp src/Meter.h src/CnfParser.cpp src/Cnf.cpp src/Clause.cpp src/Worker.cpp src/StealingWorker.h src/StealingWorker.cpp src/Dpll.cpp src/Cdcl.cpp src/CdclDependencyGraph.cpp src/Exceptions.cpp src/Variable.cpp src/MpiTypes.h src/Model.h src/Model.cpp src/ArgParsing.h)
add_executable(stealing_main ${SOURCE_FILES})
target_link_libraries(stealing_main ${MPI_LIBRARIES})