From 36495b277dae3fb782113a54065d2b937c31dee4 Mon Sep 17 00:00:00 2001 From: madmaxieee <76544194+madmaxieee@users.noreply.github.com> Date: Sat, 9 Dec 2023 22:54:10 +0800 Subject: [PATCH] chore: add cmake FetchContent support Signed-off-by: madmaxieee <76544194+madmaxieee@users.noreply.github.com> --- CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++ include/cadical/arena.hpp | 1 + include/cadical/averages.hpp | 1 + include/cadical/bins.hpp | 1 + include/cadical/block.hpp | 1 + include/cadical/build.hpp | 1 + include/cadical/cadical.hpp | 1 + include/cadical/checker.hpp | 1 + include/cadical/clause.hpp | 1 + include/cadical/config.hpp | 1 + include/cadical/contract.hpp | 1 + include/cadical/cover.hpp | 1 + include/cadical/decompose.hpp | 1 + include/cadical/drattracer.hpp | 1 + include/cadical/elim.hpp | 1 + include/cadical/ema.hpp | 1 + include/cadical/external.hpp | 1 + include/cadical/file.hpp | 1 + include/cadical/flags.hpp | 1 + include/cadical/format.hpp | 1 + include/cadical/frattracer.hpp | 1 + include/cadical/heap.hpp | 1 + include/cadical/idruptracer.hpp | 1 + include/cadical/instantiate.hpp | 1 + include/cadical/internal.hpp | 1 + include/cadical/inttypes.hpp | 1 + include/cadical/level.hpp | 1 + include/cadical/limit.hpp | 1 + include/cadical/logging.hpp | 1 + include/cadical/lratbuilder.hpp | 1 + include/cadical/lratchecker.hpp | 1 + include/cadical/lrattracer.hpp | 1 + include/cadical/message.hpp | 1 + include/cadical/occs.hpp | 1 + include/cadical/options.hpp | 1 + include/cadical/parse.hpp | 1 + include/cadical/phases.hpp | 1 + include/cadical/profile.hpp | 1 + include/cadical/proof.hpp | 1 + include/cadical/queue.hpp | 1 + include/cadical/radix.hpp | 1 + include/cadical/random.hpp | 1 + include/cadical/range.hpp | 1 + include/cadical/reap.hpp | 1 + include/cadical/reluctant.hpp | 1 + include/cadical/resources.hpp | 1 + include/cadical/score.hpp | 1 + include/cadical/signal.hpp | 1 + include/cadical/stats.hpp | 1 + include/cadical/terminal.hpp | 1 + include/cadical/tracer.hpp | 1 + include/cadical/util.hpp | 1 + include/cadical/var.hpp | 1 + include/cadical/veripbtracer.hpp | 1 + include/cadical/version.hpp | 1 + include/cadical/vivify.hpp | 1 + include/cadical/watch.hpp | 1 + 57 files changed, 90 insertions(+) create mode 100644 CMakeLists.txt create mode 120000 include/cadical/arena.hpp create mode 120000 include/cadical/averages.hpp create mode 120000 include/cadical/bins.hpp create mode 120000 include/cadical/block.hpp create mode 120000 include/cadical/build.hpp create mode 120000 include/cadical/cadical.hpp create mode 120000 include/cadical/checker.hpp create mode 120000 include/cadical/clause.hpp create mode 120000 include/cadical/config.hpp create mode 120000 include/cadical/contract.hpp create mode 120000 include/cadical/cover.hpp create mode 120000 include/cadical/decompose.hpp create mode 120000 include/cadical/drattracer.hpp create mode 120000 include/cadical/elim.hpp create mode 120000 include/cadical/ema.hpp create mode 120000 include/cadical/external.hpp create mode 120000 include/cadical/file.hpp create mode 120000 include/cadical/flags.hpp create mode 120000 include/cadical/format.hpp create mode 120000 include/cadical/frattracer.hpp create mode 120000 include/cadical/heap.hpp create mode 120000 include/cadical/idruptracer.hpp create mode 120000 include/cadical/instantiate.hpp create mode 120000 include/cadical/internal.hpp create mode 120000 include/cadical/inttypes.hpp create mode 120000 include/cadical/level.hpp create mode 120000 include/cadical/limit.hpp create mode 120000 include/cadical/logging.hpp create mode 120000 include/cadical/lratbuilder.hpp create mode 120000 include/cadical/lratchecker.hpp create mode 120000 include/cadical/lrattracer.hpp create mode 120000 include/cadical/message.hpp create mode 120000 include/cadical/occs.hpp create mode 120000 include/cadical/options.hpp create mode 120000 include/cadical/parse.hpp create mode 120000 include/cadical/phases.hpp create mode 120000 include/cadical/profile.hpp create mode 120000 include/cadical/proof.hpp create mode 120000 include/cadical/queue.hpp create mode 120000 include/cadical/radix.hpp create mode 120000 include/cadical/random.hpp create mode 120000 include/cadical/range.hpp create mode 120000 include/cadical/reap.hpp create mode 120000 include/cadical/reluctant.hpp create mode 120000 include/cadical/resources.hpp create mode 120000 include/cadical/score.hpp create mode 120000 include/cadical/signal.hpp create mode 120000 include/cadical/stats.hpp create mode 120000 include/cadical/terminal.hpp create mode 120000 include/cadical/tracer.hpp create mode 120000 include/cadical/util.hpp create mode 120000 include/cadical/var.hpp create mode 120000 include/cadical/veripbtracer.hpp create mode 120000 include/cadical/version.hpp create mode 120000 include/cadical/vivify.hpp create mode 120000 include/cadical/watch.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..519ab33f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.19) + +set(CMAKE_CXX_STANDARD 11) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" CADICAL_VERSION) +# remove version suffix to make make it valid for cmake +string(REGEX REPLACE "([0-9]+\.[0-9]+\.[0-9]+).*$" "\\1" CADICAL_VERSION + "${CADICAL_VERSION}") + +project( + cadical + LANGUAGES CXX + VERSION ${CADICAL_VERSION}) + +file( + GLOB_RECURSE SOURCES + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + "src/*.cpp" "src/*.hpp") + +list(REMOVE_ITEM SOURCES "src/mobical.cpp") +list(REMOVE_ITEM SOURCES "src/cadical.cpp") + +add_library(cadical STATIC ${SOURCES}) +add_library(cadical::cadical ALIAS cadical) +# don't generate the build header file when building the library +target_compile_definitions(cadical PRIVATE NBUILD=1) + +target_include_directories( + cadical INTERFACE $ + $) diff --git a/include/cadical/arena.hpp b/include/cadical/arena.hpp new file mode 120000 index 00000000..2f71c353 --- /dev/null +++ b/include/cadical/arena.hpp @@ -0,0 +1 @@ +../../src/arena.hpp \ No newline at end of file diff --git a/include/cadical/averages.hpp b/include/cadical/averages.hpp new file mode 120000 index 00000000..33fc32e2 --- /dev/null +++ b/include/cadical/averages.hpp @@ -0,0 +1 @@ +../../src/averages.hpp \ No newline at end of file diff --git a/include/cadical/bins.hpp b/include/cadical/bins.hpp new file mode 120000 index 00000000..3a560c41 --- /dev/null +++ b/include/cadical/bins.hpp @@ -0,0 +1 @@ +../../src/bins.hpp \ No newline at end of file diff --git a/include/cadical/block.hpp b/include/cadical/block.hpp new file mode 120000 index 00000000..f99e4567 --- /dev/null +++ b/include/cadical/block.hpp @@ -0,0 +1 @@ +../../src/block.hpp \ No newline at end of file diff --git a/include/cadical/build.hpp b/include/cadical/build.hpp new file mode 120000 index 00000000..2108c9bf --- /dev/null +++ b/include/cadical/build.hpp @@ -0,0 +1 @@ +../../src/build.hpp \ No newline at end of file diff --git a/include/cadical/cadical.hpp b/include/cadical/cadical.hpp new file mode 120000 index 00000000..04ddb398 --- /dev/null +++ b/include/cadical/cadical.hpp @@ -0,0 +1 @@ +../../src/cadical.hpp \ No newline at end of file diff --git a/include/cadical/checker.hpp b/include/cadical/checker.hpp new file mode 120000 index 00000000..1596907a --- /dev/null +++ b/include/cadical/checker.hpp @@ -0,0 +1 @@ +../../src/checker.hpp \ No newline at end of file diff --git a/include/cadical/clause.hpp b/include/cadical/clause.hpp new file mode 120000 index 00000000..1752a031 --- /dev/null +++ b/include/cadical/clause.hpp @@ -0,0 +1 @@ +../../src/clause.hpp \ No newline at end of file diff --git a/include/cadical/config.hpp b/include/cadical/config.hpp new file mode 120000 index 00000000..4e667e68 --- /dev/null +++ b/include/cadical/config.hpp @@ -0,0 +1 @@ +../../src/config.hpp \ No newline at end of file diff --git a/include/cadical/contract.hpp b/include/cadical/contract.hpp new file mode 120000 index 00000000..ab522446 --- /dev/null +++ b/include/cadical/contract.hpp @@ -0,0 +1 @@ +../../src/contract.hpp \ No newline at end of file diff --git a/include/cadical/cover.hpp b/include/cadical/cover.hpp new file mode 120000 index 00000000..20ecfda8 --- /dev/null +++ b/include/cadical/cover.hpp @@ -0,0 +1 @@ +../../src/cover.hpp \ No newline at end of file diff --git a/include/cadical/decompose.hpp b/include/cadical/decompose.hpp new file mode 120000 index 00000000..3864e242 --- /dev/null +++ b/include/cadical/decompose.hpp @@ -0,0 +1 @@ +../../src/decompose.hpp \ No newline at end of file diff --git a/include/cadical/drattracer.hpp b/include/cadical/drattracer.hpp new file mode 120000 index 00000000..97929efb --- /dev/null +++ b/include/cadical/drattracer.hpp @@ -0,0 +1 @@ +../../src/drattracer.hpp \ No newline at end of file diff --git a/include/cadical/elim.hpp b/include/cadical/elim.hpp new file mode 120000 index 00000000..499502ab --- /dev/null +++ b/include/cadical/elim.hpp @@ -0,0 +1 @@ +../../src/elim.hpp \ No newline at end of file diff --git a/include/cadical/ema.hpp b/include/cadical/ema.hpp new file mode 120000 index 00000000..80077802 --- /dev/null +++ b/include/cadical/ema.hpp @@ -0,0 +1 @@ +../../src/ema.hpp \ No newline at end of file diff --git a/include/cadical/external.hpp b/include/cadical/external.hpp new file mode 120000 index 00000000..1db13794 --- /dev/null +++ b/include/cadical/external.hpp @@ -0,0 +1 @@ +../../src/external.hpp \ No newline at end of file diff --git a/include/cadical/file.hpp b/include/cadical/file.hpp new file mode 120000 index 00000000..5e851ecd --- /dev/null +++ b/include/cadical/file.hpp @@ -0,0 +1 @@ +../../src/file.hpp \ No newline at end of file diff --git a/include/cadical/flags.hpp b/include/cadical/flags.hpp new file mode 120000 index 00000000..1360df71 --- /dev/null +++ b/include/cadical/flags.hpp @@ -0,0 +1 @@ +../../src/flags.hpp \ No newline at end of file diff --git a/include/cadical/format.hpp b/include/cadical/format.hpp new file mode 120000 index 00000000..1ebdb82c --- /dev/null +++ b/include/cadical/format.hpp @@ -0,0 +1 @@ +../../src/format.hpp \ No newline at end of file diff --git a/include/cadical/frattracer.hpp b/include/cadical/frattracer.hpp new file mode 120000 index 00000000..adac3d1e --- /dev/null +++ b/include/cadical/frattracer.hpp @@ -0,0 +1 @@ +../../src/frattracer.hpp \ No newline at end of file diff --git a/include/cadical/heap.hpp b/include/cadical/heap.hpp new file mode 120000 index 00000000..8415cbec --- /dev/null +++ b/include/cadical/heap.hpp @@ -0,0 +1 @@ +../../src/heap.hpp \ No newline at end of file diff --git a/include/cadical/idruptracer.hpp b/include/cadical/idruptracer.hpp new file mode 120000 index 00000000..98d93a79 --- /dev/null +++ b/include/cadical/idruptracer.hpp @@ -0,0 +1 @@ +../../src/idruptracer.hpp \ No newline at end of file diff --git a/include/cadical/instantiate.hpp b/include/cadical/instantiate.hpp new file mode 120000 index 00000000..17f1c1df --- /dev/null +++ b/include/cadical/instantiate.hpp @@ -0,0 +1 @@ +../../src/instantiate.hpp \ No newline at end of file diff --git a/include/cadical/internal.hpp b/include/cadical/internal.hpp new file mode 120000 index 00000000..9f3bc88c --- /dev/null +++ b/include/cadical/internal.hpp @@ -0,0 +1 @@ +../../src/internal.hpp \ No newline at end of file diff --git a/include/cadical/inttypes.hpp b/include/cadical/inttypes.hpp new file mode 120000 index 00000000..68c6ca01 --- /dev/null +++ b/include/cadical/inttypes.hpp @@ -0,0 +1 @@ +../../src/inttypes.hpp \ No newline at end of file diff --git a/include/cadical/level.hpp b/include/cadical/level.hpp new file mode 120000 index 00000000..cab9b0af --- /dev/null +++ b/include/cadical/level.hpp @@ -0,0 +1 @@ +../../src/level.hpp \ No newline at end of file diff --git a/include/cadical/limit.hpp b/include/cadical/limit.hpp new file mode 120000 index 00000000..2843fe30 --- /dev/null +++ b/include/cadical/limit.hpp @@ -0,0 +1 @@ +../../src/limit.hpp \ No newline at end of file diff --git a/include/cadical/logging.hpp b/include/cadical/logging.hpp new file mode 120000 index 00000000..0ee69846 --- /dev/null +++ b/include/cadical/logging.hpp @@ -0,0 +1 @@ +../../src/logging.hpp \ No newline at end of file diff --git a/include/cadical/lratbuilder.hpp b/include/cadical/lratbuilder.hpp new file mode 120000 index 00000000..1f5b6cdc --- /dev/null +++ b/include/cadical/lratbuilder.hpp @@ -0,0 +1 @@ +../../src/lratbuilder.hpp \ No newline at end of file diff --git a/include/cadical/lratchecker.hpp b/include/cadical/lratchecker.hpp new file mode 120000 index 00000000..f8219991 --- /dev/null +++ b/include/cadical/lratchecker.hpp @@ -0,0 +1 @@ +../../src/lratchecker.hpp \ No newline at end of file diff --git a/include/cadical/lrattracer.hpp b/include/cadical/lrattracer.hpp new file mode 120000 index 00000000..c22dba2c --- /dev/null +++ b/include/cadical/lrattracer.hpp @@ -0,0 +1 @@ +../../src/lrattracer.hpp \ No newline at end of file diff --git a/include/cadical/message.hpp b/include/cadical/message.hpp new file mode 120000 index 00000000..dc8cb4b7 --- /dev/null +++ b/include/cadical/message.hpp @@ -0,0 +1 @@ +../../src/message.hpp \ No newline at end of file diff --git a/include/cadical/occs.hpp b/include/cadical/occs.hpp new file mode 120000 index 00000000..297fbd0b --- /dev/null +++ b/include/cadical/occs.hpp @@ -0,0 +1 @@ +../../src/occs.hpp \ No newline at end of file diff --git a/include/cadical/options.hpp b/include/cadical/options.hpp new file mode 120000 index 00000000..88a16eba --- /dev/null +++ b/include/cadical/options.hpp @@ -0,0 +1 @@ +../../src/options.hpp \ No newline at end of file diff --git a/include/cadical/parse.hpp b/include/cadical/parse.hpp new file mode 120000 index 00000000..db538d75 --- /dev/null +++ b/include/cadical/parse.hpp @@ -0,0 +1 @@ +../../src/parse.hpp \ No newline at end of file diff --git a/include/cadical/phases.hpp b/include/cadical/phases.hpp new file mode 120000 index 00000000..1be2e957 --- /dev/null +++ b/include/cadical/phases.hpp @@ -0,0 +1 @@ +../../src/phases.hpp \ No newline at end of file diff --git a/include/cadical/profile.hpp b/include/cadical/profile.hpp new file mode 120000 index 00000000..3156e9b0 --- /dev/null +++ b/include/cadical/profile.hpp @@ -0,0 +1 @@ +../../src/profile.hpp \ No newline at end of file diff --git a/include/cadical/proof.hpp b/include/cadical/proof.hpp new file mode 120000 index 00000000..b54ec77b --- /dev/null +++ b/include/cadical/proof.hpp @@ -0,0 +1 @@ +../../src/proof.hpp \ No newline at end of file diff --git a/include/cadical/queue.hpp b/include/cadical/queue.hpp new file mode 120000 index 00000000..7134182a --- /dev/null +++ b/include/cadical/queue.hpp @@ -0,0 +1 @@ +../../src/queue.hpp \ No newline at end of file diff --git a/include/cadical/radix.hpp b/include/cadical/radix.hpp new file mode 120000 index 00000000..4c62dc3f --- /dev/null +++ b/include/cadical/radix.hpp @@ -0,0 +1 @@ +../../src/radix.hpp \ No newline at end of file diff --git a/include/cadical/random.hpp b/include/cadical/random.hpp new file mode 120000 index 00000000..709253fb --- /dev/null +++ b/include/cadical/random.hpp @@ -0,0 +1 @@ +../../src/random.hpp \ No newline at end of file diff --git a/include/cadical/range.hpp b/include/cadical/range.hpp new file mode 120000 index 00000000..b48ac58c --- /dev/null +++ b/include/cadical/range.hpp @@ -0,0 +1 @@ +../../src/range.hpp \ No newline at end of file diff --git a/include/cadical/reap.hpp b/include/cadical/reap.hpp new file mode 120000 index 00000000..45ded52a --- /dev/null +++ b/include/cadical/reap.hpp @@ -0,0 +1 @@ +../../src/reap.hpp \ No newline at end of file diff --git a/include/cadical/reluctant.hpp b/include/cadical/reluctant.hpp new file mode 120000 index 00000000..8f76390a --- /dev/null +++ b/include/cadical/reluctant.hpp @@ -0,0 +1 @@ +../../src/reluctant.hpp \ No newline at end of file diff --git a/include/cadical/resources.hpp b/include/cadical/resources.hpp new file mode 120000 index 00000000..6877c610 --- /dev/null +++ b/include/cadical/resources.hpp @@ -0,0 +1 @@ +../../src/resources.hpp \ No newline at end of file diff --git a/include/cadical/score.hpp b/include/cadical/score.hpp new file mode 120000 index 00000000..1217eefe --- /dev/null +++ b/include/cadical/score.hpp @@ -0,0 +1 @@ +../../src/score.hpp \ No newline at end of file diff --git a/include/cadical/signal.hpp b/include/cadical/signal.hpp new file mode 120000 index 00000000..3565ba32 --- /dev/null +++ b/include/cadical/signal.hpp @@ -0,0 +1 @@ +../../src/signal.hpp \ No newline at end of file diff --git a/include/cadical/stats.hpp b/include/cadical/stats.hpp new file mode 120000 index 00000000..38bfd495 --- /dev/null +++ b/include/cadical/stats.hpp @@ -0,0 +1 @@ +../../src/stats.hpp \ No newline at end of file diff --git a/include/cadical/terminal.hpp b/include/cadical/terminal.hpp new file mode 120000 index 00000000..18a44391 --- /dev/null +++ b/include/cadical/terminal.hpp @@ -0,0 +1 @@ +../../src/terminal.hpp \ No newline at end of file diff --git a/include/cadical/tracer.hpp b/include/cadical/tracer.hpp new file mode 120000 index 00000000..70fc42f4 --- /dev/null +++ b/include/cadical/tracer.hpp @@ -0,0 +1 @@ +../../src/tracer.hpp \ No newline at end of file diff --git a/include/cadical/util.hpp b/include/cadical/util.hpp new file mode 120000 index 00000000..339edabc --- /dev/null +++ b/include/cadical/util.hpp @@ -0,0 +1 @@ +../../src/util.hpp \ No newline at end of file diff --git a/include/cadical/var.hpp b/include/cadical/var.hpp new file mode 120000 index 00000000..686673aa --- /dev/null +++ b/include/cadical/var.hpp @@ -0,0 +1 @@ +../../src/var.hpp \ No newline at end of file diff --git a/include/cadical/veripbtracer.hpp b/include/cadical/veripbtracer.hpp new file mode 120000 index 00000000..7d4005e4 --- /dev/null +++ b/include/cadical/veripbtracer.hpp @@ -0,0 +1 @@ +../../src/veripbtracer.hpp \ No newline at end of file diff --git a/include/cadical/version.hpp b/include/cadical/version.hpp new file mode 120000 index 00000000..08dc92e4 --- /dev/null +++ b/include/cadical/version.hpp @@ -0,0 +1 @@ +../../src/version.hpp \ No newline at end of file diff --git a/include/cadical/vivify.hpp b/include/cadical/vivify.hpp new file mode 120000 index 00000000..d88ea7be --- /dev/null +++ b/include/cadical/vivify.hpp @@ -0,0 +1 @@ +../../src/vivify.hpp \ No newline at end of file diff --git a/include/cadical/watch.hpp b/include/cadical/watch.hpp new file mode 120000 index 00000000..a1d6251d --- /dev/null +++ b/include/cadical/watch.hpp @@ -0,0 +1 @@ +../../src/watch.hpp \ No newline at end of file