summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 21 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 453f1bcf7..86007b39a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,6 +90,7 @@ set(ABC_DIR "" CACHE STRING "Set ABC install directory")
set(ANTLR_DIR "" CACHE STRING "Set ANTLR3 install directory")
set(CADICAL_DIR "" CACHE STRING "Set CaDiCaL install directory")
set(CRYPTOMINISAT_DIR "" CACHE STRING "Set CryptoMiniSat install directory")
+set(CXXTEST_DIR "" CACHE STRING "Set CxxTest install directory")
set(GLPK_DIR "" CACHE STRING "Set GLPK install directory")
set(GMP_DIR "" CACHE STRING "Set GMP install directory")
set(LFSC_DIR "" CACHE STRING "Set LFSC install directory")
@@ -217,6 +218,24 @@ endif()
enable_testing()
#-----------------------------------------------------------------------------#
+# Check GCC version.
+#
+# GCC version 4.5.1 builds MiniSat incorrectly with -O2, which results in
+# incorrect answers.
+
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ execute_process(
+ COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GCC_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(GCC_VERSION VERSION_EQUAL "4.5.1")
+ message(FATAL_ERROR
+ "GCC 4.5.1's optimizer is known to build MiniSat incorrectly "
+ "(and by extension CVC4).")
+ endif()
+endif()
+
+#-----------------------------------------------------------------------------#
# Check options, find packages and configure build.
if(USE_PYTHON2)
@@ -252,8 +271,8 @@ if(ENABLE_COVERAGE)
add_definitions(-DCVC4_COVERAGE)
setup_target_for_coverage_lcov(
NAME coverage
- EXECUTABLE ctest -j${CTEST_NTHREADS} $(ARGS)
- DEPENDENCIES cvc4-bin)
+ EXECUTABLE
+ ctest -j${CTEST_NTHREADS} -LE "example" --output-on-failure $(ARGS))
endif()
if(ENABLE_DEBUG_CONTEXT_MM)
@@ -312,10 +331,6 @@ if(ENABLE_TRACING)
add_definitions(-DCVC4_TRACING)
endif()
-if(ENABLE_UNIT_TESTING)
- find_package(CxxTest REQUIRED)
-endif()
-
if(ENABLE_STATISTICS)
add_definitions(-DCVC4_STATISTICS_ON)
endif()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback