diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-12 00:08:19 -0700 |
---|---|---|
committer | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-22 16:30:59 -0700 |
commit | 507748d8bbdd2c9a2d29f83fd7f4ee6ac8d3fe08 (patch) | |
tree | 5bebc96652aa40aa970c51f796e89f8f619192bd /src/options | |
parent | 52281cf25960740c46275783cf62c881fa8ef703 (diff) |
cmake: Only build libcvc4 and libcvc4parser as libraries.
The sources of all previous libraries are now added to libcvc4 and built as
libcvc4. This removes circular dependencies between libcvc4 and libexpr.
Further, we now only have one parser library and don't build additional
libraries for each language.
Diffstat (limited to 'src/options')
-rw-r--r-- | src/options/CMakeLists.txt | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/src/options/CMakeLists.txt b/src/options/CMakeLists.txt index 10511867f..457fd23cd 100644 --- a/src/options/CMakeLists.txt +++ b/src/options/CMakeLists.txt @@ -1,11 +1,44 @@ -macro(prepend_path) - foreach(SOURCE_FILE ${ARGN}) - set(PREPEND_PATH_SOURCES - ${PREPEND_PATH_SOURCES} - ${CMAKE_CURRENT_LIST_DIR}/${SOURCE_FILE}) - endforeach() - set(PREPEND_PATH_SOURCES ${PREPEND_PATH_SOURCES} PARENT_SCOPE) -endmacro() +libcvc4_add_sources( + argument_extender.h + argument_extender_implementation.cpp + argument_extender_implementation.h + arith_heuristic_pivot_rule.cpp + arith_heuristic_pivot_rule.h + arith_propagation_mode.cpp + arith_propagation_mode.h + arith_unate_lemma_mode.cpp + arith_unate_lemma_mode.h + base_handlers.h + bv_bitblast_mode.cpp + bv_bitblast_mode.h + datatypes_modes.h + decision_mode.cpp + decision_mode.h + decision_weight.h + didyoumean.cpp + didyoumean.h + language.cpp + language.h + open_ostream.cpp + open_ostream.h + option_exception.h + options.h + options_handler.cpp + options_handler.h + options_public_functions.cpp + printer_modes.cpp + printer_modes.h + quantifiers_modes.cpp + quantifiers_modes.h + set_language.cpp + set_language.h + simplification_mode.cpp + simplification_mode.h + sygus_out_mode.h + theoryof_mode.cpp + theoryof_mode.h + ufss_mode.h +) set(options_toml_files arith_options.toml @@ -36,17 +69,21 @@ set(options_toml_files string(REPLACE "toml" "cpp;" options_gen_cpp_files ${options_toml_files}) string(REPLACE "toml" "h;" options_gen_h_files ${options_toml_files}) -prepend_path(${options_toml_files}) +libcvc4_add_sources(GENERATED options.cpp ${options_gen_cpp_files}) + +list_prepend(options_toml_files "${CMAKE_CURRENT_LIST_DIR}/" abs_toml_files) add_custom_command( - OUTPUT options.cpp options_holder.h ${options_gen_cpp_files} ${options_gen_h_files} + OUTPUT + options.cpp options_holder.h + ${options_gen_cpp_files} ${options_gen_h_files} COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/mkoptions.py ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../../doc ${CMAKE_CURRENT_BINARY_DIR} - ${PREPEND_PATH_SOURCES} + ${abs_toml_files} DEPENDS mkoptions.py ${options_toml_files} @@ -59,47 +96,10 @@ add_custom_command( ${CMAKE_CURRENT_BINARY_DIR}/../../doc/options.3cvc_template ) -set(options_src_files - argument_extender.h - argument_extender_implementation.cpp - argument_extender_implementation.h - arith_heuristic_pivot_rule.cpp - arith_heuristic_pivot_rule.h - arith_propagation_mode.cpp - arith_propagation_mode.h - arith_unate_lemma_mode.cpp - arith_unate_lemma_mode.h - base_handlers.h - bv_bitblast_mode.cpp - bv_bitblast_mode.h - datatypes_modes.h - decision_mode.cpp - decision_mode.h - decision_weight.h - didyoumean.cpp - didyoumean.h - language.cpp - language.h - open_ostream.cpp - open_ostream.h - option_exception.h - options.h - options_handler.cpp - options_handler.h - options_public_functions.cpp - printer_modes.cpp - printer_modes.h - quantifiers_modes.cpp - quantifiers_modes.h - set_language.cpp - set_language.h - simplification_mode.cpp - simplification_mode.h - sygus_out_mode.h - theoryof_mode.cpp - theoryof_mode.h - ufss_mode.h +add_custom_target(gen-options + DEPENDS + options.cpp + options_holder.h + ${options_gen_cpp_files} + ${options_gen_h_files} ) - -add_library(options options.cpp ${options_gen_cpp_files} ${options_src_files}) -target_compile_definitions(options PRIVATE -D__BUILDING_CVC4LIB) |