@@ -89,18 +89,20 @@ set(extern_location ${CMAKE_CURRENT_BINARY_DIR}/extern)
89
89
set (extern_include_directory ${extern_location} /include )
90
90
file (MAKE_DIRECTORY ${extern_include_directory} )
91
91
92
+ ################################################################################
93
+
92
94
set (minisat_lib ${extern_location} /lib/${CMAKE_STATIC_LIBRARY_PREFIX} minisat2-condensed${CMAKE_STATIC_LIBRARY_SUFFIX} )
93
95
94
- # minisat download
95
- # This downloads minisat2, then patches it.
96
- # Then, it injects a minimal CMakeLists.txt so that we can build just the bits
97
- # we actually want, without having to update the provided makefile.
96
+ # minisat download: This downloads minisat2, then patches it. Then, it
97
+ # injects a minimal CMakeLists.txt so that we can build just the bits we
98
+ # actually want, without having to update the provided makefile.
99
+
98
100
ExternalProject_Add(minisat2-extern
99
101
PREFIX ${extern_location}
100
102
URL http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
101
103
PATCH_COMMAND patch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR} /../scripts/minisat-2.2.1-patch
102
104
COMMAND cmake -E copy ${CMAKE_CURRENT_SOURCE_DIR} /../scripts/minisat2_CMakeLists.txt CMakeLists.txt
103
- CMAKE_ARGS -DCBMC_INCLUDE_DIR:path =${CMAKE_CURRENT_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX: PATH =<INSTALL_DIR>
105
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX: PATH =<INSTALL_DIR> - DCBMC_INCLUDE_DIR:path =${CMAKE_CURRENT_SOURCE_DIR}
104
106
BUILD_BYPRODUCTS ${minisat_lib}
105
107
)
106
108
@@ -111,6 +113,32 @@ set_target_properties(minisat2-condensed PROPERTIES
111
113
)
112
114
add_dependencies (minisat2-condensed minisat2-extern)
113
115
116
+ ################################################################################
117
+
118
+ set (glucose_lib ${extern_location} /lib/${CMAKE_STATIC_LIBRARY_PREFIX} glucose-condensed${CMAKE_STATIC_LIBRARY_SUFFIX} )
119
+
120
+ # glucose download: This downloads glucose, then patches it. Then, it
121
+ # injects a minimal CMakeLists.txt so that we can build just the bits we
122
+ # actually want, without having to update the provided makefile.
123
+
124
+ ExternalProject_Add(glucose-extern
125
+ PREFIX ${extern_location}
126
+ URL http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup.tgz
127
+ PATCH_COMMAND patch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR} /../scripts/glucose-syrup-patch
128
+ COMMAND cmake -E copy ${CMAKE_CURRENT_SOURCE_DIR} /../scripts/glucose_CMakeLists.txt CMakeLists.txt
129
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH =<INSTALL_DIR>
130
+ BUILD_BYPRODUCTS ${glucose_lib}
131
+ )
132
+
133
+ add_library (glucose-condensed STATIC IMPORTED )
134
+ set_target_properties (glucose-condensed PROPERTIES
135
+ IMPORTED_LOCATION ${glucose_lib}
136
+ INTERFACE_INCLUDE_DIRECTORIES "${extern_include_directory} "
137
+ )
138
+ add_dependencies (glucose-condensed glucose-extern)
139
+
140
+ ################################################################################
141
+
114
142
# Override add_executable to automatically sign the target on OSX.
115
143
function (add_executable name )
116
144
_add_executable(${name} ${ARGN} )
0 commit comments