Skip to content

Commit 91684da

Browse files
committed
Clean up CMake files after diffblue#1321
1 parent 7d4e9b5 commit 91684da

File tree

6 files changed

+10
-32
lines changed

6 files changed

+10
-32
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
2525
# config.inc doesn't seem to do that currently
2626
endif()
2727

28-
add_subdirectory(src)
29-
3028
set(enable_cbmc_tests on CACHE BOOL "Whether CBMC tests should be enabled")
3129

3230
set(sat_impl "minisat2" CACHE STRING
3331
"This setting controls the SAT library which is used. Valid values are 'minisat2' and 'glucose'"
3432
)
3533

34+
add_subdirectory(src)
35+
3636
if(${enable_cbmc_tests})
3737
enable_testing()
3838
endif()

src/goto-analyzer/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ file(GLOB_RECURSE sources "*.cpp")
33
file(GLOB_RECURSE headers "*.h")
44
list(REMOVE_ITEM sources
55
${CMAKE_CURRENT_SOURCE_DIR}/goto_analyzer_main.cpp
6-
7-
# This doesn't build
8-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/xml_goto_function.cpp
96
)
107
add_library(goto-analyzer-lib ${sources} ${headers})
118

src/goto-cc/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@ file(GLOB_RECURSE sources "*.cpp")
33
file(GLOB_RECURSE headers "*.h")
44
list(REMOVE_ITEM sources
55
${CMAKE_CURRENT_SOURCE_DIR}/goto_cc_main.cpp
6-
7-
# These files don't build
8-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/read_goto_object.cpp
9-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/xml_goto_function.cpp
10-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/xml_goto_function_hashing.cpp
11-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/xml_goto_program.cpp
12-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/xml_goto_program_hashing.cpp
13-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/xml_irep_hashing.cpp
14-
${CMAKE_CURRENT_SOURCE_DIR}/xml_binaries/xml_symbol_hashing.cpp
156
)
167
add_library(goto-cc-lib ${sources} ${headers})
178

src/goto-programs/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
file(GLOB_RECURSE sources "*.cpp")
22
file(GLOB_RECURSE headers "*.h")
3-
list(REMOVE_ITEM sources
4-
${CMAKE_CURRENT_SOURCE_DIR}/goto_convert_new_switch_case.cpp
5-
)
63
add_library(goto-programs ${sources} ${headers})
74

85
generic_includes(goto-programs)

src/java_bytecode/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
file(GLOB_RECURSE sources "*.cpp")
22
file(GLOB_RECURSE headers "*.h")
3-
list(REMOVE_ITEM sources
4-
${CMAKE_CURRENT_SOURCE_DIR}/java_bytecode_vtable.cpp
5-
)
63
add_library(java_bytecode ${sources} ${headers})
74

85
generic_includes(java_bytecode)

src/solvers/CMakeLists.txt

+8-12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ set(booleforce_source
4141
set(minibdd_source
4242
${CMAKE_CURRENT_SOURCE_DIR}/miniBDD/example.cpp
4343
)
44+
set(limmat_source
45+
${CMAKE_CURRENT_SOURCE_DIR}/sat/satcheck_limmat.cpp
46+
)
4447

4548
file(GLOB_RECURSE sources "*.cpp")
4649
file(GLOB_RECURSE headers "*.h")
@@ -57,26 +60,19 @@ list(REMOVE_ITEM sources
5760
${lingeling_source}
5861
${booleforce_source}
5962
${minibdd_source}
60-
61-
# Some files just don't build
62-
${CMAKE_CURRENT_SOURCE_DIR}/cvc/cvc_prop.cpp
63-
${CMAKE_CURRENT_SOURCE_DIR}/dplib/dplib_prop.cpp
64-
${CMAKE_CURRENT_SOURCE_DIR}/dplib/dplib_conv.cpp
65-
${CMAKE_CURRENT_SOURCE_DIR}/dplib/dplib_dec.cpp
66-
${CMAKE_CURRENT_SOURCE_DIR}/floatbv/float_approximation.cpp
67-
${CMAKE_CURRENT_SOURCE_DIR}/sat/satcheck_limmat.cpp
68-
${CMAKE_CURRENT_SOURCE_DIR}/smt1/smt1_prop.cpp
69-
${CMAKE_CURRENT_SOURCE_DIR}/smt2/smt2_prop.cpp
63+
${limmat_source}
7064
)
7165

7266
add_library(solvers ${sources} ${headers})
7367

74-
if("${sat_impl}" STREQUAL "minisat2" AND TARGET minisat2-extern)
68+
if("${sat_impl}" STREQUAL "minisat2")
69+
message(STATUS "Building solvers with minisat2")
7570
target_sources(solvers PRIVATE ${minisat2_source})
7671
add_dependencies(solvers minisat2-extern)
7772
target_compile_definitions(solvers PUBLIC SATCHECK_MINISAT2 HAVE_MINISAT2 __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS)
7873
target_link_libraries(solvers minisat2-condensed)
79-
elseif("${sat_impl}" STREQUAL "glucose" AND TARGET glucose-extern)
74+
elseif("${sat_impl}" STREQUAL "glucose")
75+
message(STATUS "Building solvers with glucose")
8076
target_sources(solvers PRIVATE ${glucose_source})
8177
add_dependencies(solvers glucose-extern)
8278
target_compile_definitions(solvers PUBLIC SATCHECK_GLUCOSE HAVE_GLUCOSE __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS)

0 commit comments

Comments
 (0)