Skip to content

Commit 68bc98d

Browse files
authoredJan 24, 2019
Merge pull request #3909 from tautschnig/vs-minisat
Silence all Visual Studio warnings when building Minisat or Glucose [blocks: #2310]
2 parents 6d38cb2 + 291343b commit 68bc98d

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
 

‎scripts/glucose_CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ set_target_properties(
1414
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Developer ID Application: Daniel Kroening"
1515
)
1616

17+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
18+
target_compile_options(glucose-condensed PUBLIC /w)
19+
endif()
20+
1721
target_include_directories(glucose-condensed
1822
PUBLIC
1923
${CMAKE_CURRENT_SOURCE_DIR}

‎scripts/minisat2_CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ set_target_properties(
1414
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Developer ID Application: Daniel Kroening"
1515
)
1616

17+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
18+
target_compile_options(minisat2-condensed PUBLIC /w)
19+
endif()
20+
1721
target_include_directories(minisat2-condensed
1822
PUBLIC
1923
${CMAKE_CURRENT_SOURCE_DIR}

‎src/solvers/Makefile

+26
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,32 @@ SRC = $(BOOLEFORCE_SRC) \
193193

194194
include ../common
195195

196+
ifneq ($(MINISAT2),)
197+
ifeq ($(BUILD_ENV_),MSVC)
198+
sat/satcheck_minisat2$(OBJEXT): sat/satcheck_minisat2.cpp
199+
$(CXX) $(CP_CXXFLAGS) /w /nologo /c /EHsc $< /Fo$@
200+
201+
$(MINISAT2)/minisat/simp/SimpSolver$(OBJEXT): $(MINISAT2)/minisat/simp/SimpSolver.cc
202+
$(CXX) $(CP_CXXFLAGS) /w /nologo /c /EHsc $< /Fo$@
203+
204+
$(MINISAT2)/minisat/core/Solver$(OBJEXT): $(MINISAT2)/minisat/core/Solver.cc
205+
$(CXX) $(CP_CXXFLAGS) /w /nologo /c /EHsc $< /Fo$@
206+
endif
207+
endif
208+
209+
ifneq ($(GLUCOSE),)
210+
ifeq ($(BUILD_ENV_),MSVC)
211+
sat/satcheck_glucose$(OBJEXT): sat/satcheck_glucose.cpp
212+
$(CXX) $(CP_CXXFLAGS) /w /nologo /c /EHsc $< /Fo$@
213+
214+
$(GLUCOSE)/simp/SimpSolver$(OBJEXT): $(GLUCOSE)/simp/SimpSolver.cc
215+
$(CXX) $(CP_CXXFLAGS) /w /nologo /c /EHsc $< /Fo$@
216+
217+
$(GLUCOSE)/core/Solver$(OBJEXT): $(GLUCOSE)/core/Solver.cc
218+
$(CXX) $(CP_CXXFLAGS) /w /nologo /c /EHsc $< /Fo$@
219+
endif
220+
endif
221+
196222
INCLUDES += -I .. \
197223
$(CHAFF_INCLUDE) $(BOOLEFORCE_INCLUDE) $(MINISAT_INCLUDE) $(MINISAT2_INCLUDE) \
198224
$(IPASIR_INCLUDE) \

0 commit comments

Comments
 (0)
Please sign in to comment.