-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
81 lines (73 loc) · 2.48 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
cmake_minimum_required (VERSION 2.8)
set(CMAKE_BUILD_TYPE Release)
include_directories(.)
set (SOURCE_FILES
src/main.cpp
src/search/greedy_best_first.cpp
src/search/depth_first_search.cpp
)
set (WARNINGS
-Wall
-Wextra
-Wshadow
-Wnon-virtual-dtor
-Wold-style-cast
-Wcast-align
-Wunused
-Woverloaded-virtual
-Wpedantic
-Wconversion
-Wsign-conversion
-Wmisleading-indentation
-Wduplicated-cond
-Wduplicated-branches
-Wlogical-op
-Wnull-dereference
-Wuseless-cast
-Wdouble-promotion
-Wformat=2
-Wunreachable-code
# -Weffc++
)
string (REPLACE ";" " " WARNINGS_STR "${WARNINGS}")
set(CMAKE_CXX_FLAGS "-std=c++17 -msse4.2 -g -O3 -march=native ${WARNINGS_STR}")
message(${CMAKE_CXX_FLAGS})
# glucose
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sat/glucose4/libipasirglucose4.a
COMMAND make all
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sat/glucose4
)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/sat/glucose4)
add_executable(pasar_glucose ${SOURCE_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/sat/glucose4/libipasirglucose4.a)
target_compile_definitions(pasar_glucose PRIVATE IPASIR_EXTENSION)
target_link_libraries(pasar_glucose ipasirglucose4.a)
# minisat
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sat/minisat220/libipasirminisat220.a
COMMAND make all
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sat/minisat220
)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/sat/minisat220)
add_executable(pasar_minisat ${SOURCE_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/sat/minisat220/libipasirminisat220.a)
target_link_libraries(pasar_minisat ipasirminisat220.a)
# lingeling
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sat/lingeling/liblgl.a
COMMAND ./configure.sh
COMMAND make all
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sat/lingeling
)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/sat/lingeling)
add_executable(pasar_lingeling ${SOURCE_FILES} sat/lingeling/Lingeling.cpp ${CMAKE_CURRENT_SOURCE_DIR}/sat/lingeling/liblgl.a)
target_link_libraries(pasar_lingeling lgl.a)
target_compile_options(pasar_lingeling PRIVATE "-llgl")
# picosat
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sat/picosat961/libipasirpicosat961.a
COMMAND make all
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sat/picosat961
)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/sat/picosat961)
add_executable(pasar_picosat ${SOURCE_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/sat/picosat961/libipasirpicosat961.a)
target_link_libraries(pasar_picosat ipasirpicosat961.a)