diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-08-10 16:19:43 -0700 |
---|---|---|
committer | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-22 16:30:59 -0700 |
commit | d5614f1c7f0380266abf6fd185b13d654657731d (patch) | |
tree | f73702f3c2e823a6a785f1465a06d221ef14d07b /src/options | |
parent | 424923f1317f3182574ebe730ebe0c81b7dbf494 (diff) |
cmake: Working build infrastructure.
TODO: cvc4autoconfig.h
Diffstat (limited to 'src/options')
-rw-r--r-- | src/options/CMakeLists.txt | 63 | ||||
-rwxr-xr-x | src/options/mkoptions.py | 2 |
2 files changed, 57 insertions, 8 deletions
diff --git a/src/options/CMakeLists.txt b/src/options/CMakeLists.txt index 89f6ff16e..5fcc22bd9 100644 --- a/src/options/CMakeLists.txt +++ b/src/options/CMakeLists.txt @@ -33,12 +33,13 @@ set(options_toml_files uf_options.toml ) -string(REPLACE "toml" "cpp;" options_cpp_files ${options_toml_files}) -string(REPLACE "toml" "h;" options_h_files ${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}) add_custom_command( + OUTPUT options.cpp options_holder.h ${options_gen_cpp_files} ${options_gen_h_files} COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/mkoptions.py @@ -46,9 +47,59 @@ add_custom_command( ${CMAKE_CURRENT_BINARY_DIR}/../../doc ${CMAKE_CURRENT_BINARY_DIR} ${PREPEND_PATH_SOURCES} - DEPENDS mkoptions.py ${options_toml_files} - OUTPUT ${options_cpp_files} ${options_h_files} - COMMENT "Generating code for options." + DEPENDS + mkoptions.py + ${options_toml_files} + module_template.h + module_template.cpp + options_holder_template.h + options_template.cpp + ${CMAKE_CURRENT_BINARY_DIR}/../../doc/cvc4.1_template + ${CMAKE_CURRENT_BINARY_DIR}/../../doc/SmtEngine.3cvc_template + ${CMAKE_CURRENT_BINARY_DIR}/../../doc/options.3cvc_template ) -#add_library(options STATIC ${options_cpp_files}) +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_library(options SHARED options.cpp ${options_gen_cpp_files} ${options_src_files}) +set_target_properties(options PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4LIB) diff --git a/src/options/mkoptions.py b/src/options/mkoptions.py index f3a045e02..8f801466c 100755 --- a/src/options/mkoptions.py +++ b/src/options/mkoptions.py @@ -303,10 +303,8 @@ def write_file(directory, name, content): if os.path.isfile(fname): with open(fname, 'r') as file: if content == file.read(): - print('{} is up-to-date'.format(name)) return with open(fname, 'w') as file: - print('generated {}'.format(name)) file.write(content) except IOError: die("Could not write '{}'".format(fname)) |