cmake: More documentation, clean up.
authorAina Niemetz <aina.niemetz@gmail.com>
Mon, 17 Sep 2018 18:07:31 +0000 (11:07 -0700)
committerMathias Preiner <mathias.preiner@gmail.com>
Sat, 22 Sep 2018 23:30:59 +0000 (16:30 -0700)
13 files changed:
doc/CMakeLists.txt
src/CMakeLists.txt
src/main/CMakeLists.txt
src/parser/CMakeLists.txt
test/regress/CMakeLists.txt
test/unit/base/CMakeLists.txt
test/unit/context/CMakeLists.txt
test/unit/expr/CMakeLists.txt
test/unit/main/CMakeLists.txt
test/unit/parser/CMakeLists.txt
test/unit/preprocessing/CMakeLists.txt
test/unit/prop/CMakeLists.txt
test/unit/util/CMakeLists.txt

index ffa8b7725e64f38ab9f960d48e45c3fb747c65b2..5f71dd2b428b03a4427fc05ace7e132b447a9c45 100644 (file)
@@ -1,7 +1,12 @@
+#-----------------------------------------------------------------------------#
 # Set variables required for the documentation *.in files
+
 string(TIMESTAMP MAN_DATE "%Y-%m-%d")
 set(VERSION CVC4_RELEASE_STRING)
 
+#-----------------------------------------------------------------------------#
+# Generate files
+
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/SmtEngine.3cvc_template.in
   ${CMAKE_CURRENT_BINARY_DIR}/SmtEngine.3cvc_template)
@@ -26,6 +31,9 @@ configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/options.3cvc_template.in
   ${CMAKE_CURRENT_BINARY_DIR}/options.3cvc_template)
 
+#-----------------------------------------------------------------------------#
+# Install man pages
+
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cvc4.1 DESTINATION share/man/man1)
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cvc4.5 DESTINATION share/man/man5)
 if(ENABLE_PORTFOLIO)
index 17d7fd814ecccadf6ddb5de99a1d96f2825175e1..4ba64c11ad1869e91b3beff68546e0332fa52e90 100644 (file)
@@ -1,3 +1,6 @@
+#-----------------------------------------------------------------------------#
+# Collect libcvc4 source files
+
 libcvc4_add_sources(
   api/cvc4cpp.cpp
   api/cvc4cpp.h
@@ -646,10 +649,15 @@ libcvc4_add_sources(
   theory/valuation.h
 )
 
+#-----------------------------------------------------------------------------#
 # Add required include paths for this and all subdirectories.
+
 include_directories(include)
 include_directories(. ${CMAKE_CURRENT_BINARY_DIR})
 
+#-----------------------------------------------------------------------------#
+# Add subdirectories
+
 add_subdirectory(base)
 add_subdirectory(expr)
 add_subdirectory(main)
@@ -658,8 +666,10 @@ add_subdirectory(parser)
 add_subdirectory(theory)
 add_subdirectory(util)
 
-# All sources for libcvc4 are now collected via libcvc4_add_sources. We can
-# now build libcvc4.
+#-----------------------------------------------------------------------------#
+# All sources for libcvc4 are now collected in LIBCVC4_SRCS and (if generated)
+# LIBCVC4_GEN_SRCS (via libcvc4_add_sources). We can now build libcvc4.
+
 set_source_files_properties(${LIBCVC4_GEN_SRCS} PROPERTIES GENERATED TRUE)
 add_library(cvc4 ${LIBCVC4_SRCS} ${LIBCVC4_GEN_SRCS})
 
index a0cbd3b771d6ff19a5ff590a60c8623003c49b68..39c4b27796f99a6d5fdecb79e7dbb93567640668 100644 (file)
@@ -1,3 +1,6 @@
+#-----------------------------------------------------------------------------#
+# libmain source files
+
 set(libmain_src_files
   command_executor.cpp
   driver_unified.cpp
@@ -7,8 +10,10 @@ set(libmain_src_files
   util.cpp
 )
 
+#-----------------------------------------------------------------------------#
 # Build object library since we will use the object files for cvc4-bin,
 # pcvc4-bin, and main-test library.
+
 add_library(main OBJECT ${libmain_src_files})
 target_compile_definitions(main PRIVATE -D__BUILDING_CVC4DRIVER)
 if(BUILD_SHARED_LIBS)
@@ -29,6 +34,9 @@ target_include_directories(main PRIVATE ${LIBCVC4_INCLUDES})
 add_library(main-test $<TARGET_OBJECTS:main>)
 target_link_libraries(main-test cvc4 cvc4parser)
 
+#-----------------------------------------------------------------------------#
+# cvc4 binary configuration
+
 add_executable(cvc4-bin main.cpp $<TARGET_OBJECTS:main>)
 target_compile_definitions(cvc4-bin PRIVATE -D__BUILDING_CVC4DRIVER)
 set_target_properties(cvc4-bin
@@ -69,6 +77,9 @@ if(USE_READLINE)
   endif()
 endif()
 
+#-----------------------------------------------------------------------------#
+# Generate language tokens header files.
+
 foreach(lang Cvc Smt1 Smt2 Tptp)
   string(TOLOWER ${lang} lang_lc)
   add_custom_command(
@@ -81,6 +92,7 @@ foreach(lang Cvc Smt1 Smt2 Tptp)
   )
 endforeach()
 
+# Create target used as a dependency for libmain.
 add_custom_target(gen-tokens
   DEPENDS
     cvc_tokens.h
@@ -88,3 +100,4 @@ add_custom_target(gen-tokens
     smt2_tokens.h
     tptp_tokens.h
 )
+
index 389ebd814aa6e8b313b641ababad009a0568bbef..b18573fe5717d2220f0283fd702e17bb8d5a8cbc 100644 (file)
@@ -8,7 +8,10 @@ endif()
 # Java runtime is required for ANTLR
 find_package(Java COMPONENTS Runtime REQUIRED)
 
-set(cvc4parser_src_files
+#-----------------------------------------------------------------------------#
+# libcvc4parser source files
+
+set(libcvc4parser_src_files
   antlr_input.cpp
   antlr_input.h
   antlr_input_imports.cpp
@@ -51,7 +54,9 @@ set(cvc4parser_src_files
   tptp/tptp_input.h
 )
 
+#-----------------------------------------------------------------------------#
 # Generate parsers for all supported languages
+
 foreach(lang Cvc Smt1 Smt2 Tptp)
   string(TOLOWER ${lang} lang_dir)
   file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir})
@@ -78,10 +83,13 @@ foreach(lang Cvc Smt1 Smt2 Tptp)
   set_source_files_properties(${gen_src_files} PROPERTIES GENERATED TRUE)
 
   # Add generated source files to the parser source files
-  list(APPEND cvc4parser_src_files ${gen_src_files})
+  list(APPEND libcvc4parser_src_files ${gen_src_files})
 endforeach()
 
-add_library(cvc4parser ${cvc4parser_src_files})
+#-----------------------------------------------------------------------------#
+# libcvc4parser configuration
+
+add_library(cvc4parser ${libcvc4parser_src_files})
 set_target_properties(cvc4parser PROPERTIES SOVERSION ${CVC4_SOVERSION})
 target_compile_definitions(cvc4parser PRIVATE -D__BUILDING_CVC4PARSERLIB)
 target_link_libraries(cvc4parser cvc4 ${ANTLR_LIBRARIES})
index 9ecb218d80f7145a9556e8a153a7557042369913..e0bdc2bfc4bbce3835cd15ff5f2cb5b9a7288d00 100644 (file)
@@ -1,3 +1,6 @@
+#-----------------------------------------------------------------------------#
+# Regression level 0 tests
+
 set(regress_0_tests
   regress0/arith/arith.01.cvc
   regress0/arith/arith.02.cvc
@@ -1005,6 +1008,9 @@ set(regress_0_tests
   regress0/sygus/hd-05-d1-prog-nogrammar.sy
 )
 
+#-----------------------------------------------------------------------------#
+# Regression level 1 tests
+
 set(regress_1_tests
   regress1/arith/arith-int-004.cvc
   regress1/arith/arith-int-011.cvc
@@ -1640,6 +1646,9 @@ set(regress_1_tests
   regress1/wrong-qfabvfp-smtcomp2018.smt2
 )
 
+#-----------------------------------------------------------------------------#
+# Regression level 2 tests
+
 set(regress_2_tests
   regress2/DTP_k2_n35_c175_s15.smt2
   regress2/FIREFLY_3_e2_2236_e7_3681.ec.minimized.smt2
@@ -1717,6 +1726,9 @@ set(regress_2_tests
   regress2/xs-09-16-3-4-1-5.smt
 )
 
+#-----------------------------------------------------------------------------#
+# Regression level 3 tests
+
 set(regress_3_tests
   regress3/bmc-ibm-1.smt
   regress3/bmc-ibm-2.smt
@@ -1732,6 +1744,9 @@ set(regress_3_tests
   regress3/qwh.35.405.shuffled-as.sat03-1651.smt
 )
 
+#-----------------------------------------------------------------------------#
+# Regression level 4 tests
+
 set(regress_4_tests
   regress4/C880mul.miter.shuffled-as.sat03-348.smt
   regress4/NEQ016_size5.smt
@@ -1741,7 +1756,9 @@ set(regress_4_tests
   regress4/instance_1151.smt
 )
 
-# These tests will not be run.
+#-----------------------------------------------------------------------------#
+# Disabled tests, will not be run.
+
 set(regression_disabled_tests
   regress0/arith/bug549.cvc
   regress0/arith/incorrect1.smt
index 4c2a0517e128d8f6399a3d461bf3b5539d93c2ed..139d6d5771e33466cbb94d28b64de995a3cf387e 100644 (file)
@@ -1 +1,4 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_black(map_util_black)
index b332d73402a2681099f8ea88fa1866d90ba4be0b..3d556ff6dedd49415cefb9ae46dea78e2359eed6 100644 (file)
@@ -1,3 +1,6 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_black(cdlist_black)
 cvc4_add_unit_test_black(cdmap_black)
 cvc4_add_unit_test_white(cdmap_white)
index ca5fcbe6d709a9d8cc0ea7eb9b1faaf579a20a1b..816d3bd7189c2080462469e17fb6471aff854046 100644 (file)
@@ -1,3 +1,6 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_black(attribute_black)
 cvc4_add_unit_test_white(attribute_white)
 cvc4_add_unit_test_black(expr_manager_public)
index 7b90f0ca4d79488c97be522e72bc3373d5d8daad..2b2497a4b36788870052d338d66c5490035f47b4 100644 (file)
@@ -1 +1,4 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_black(interactive_shell_black)
index fd3227be38b92b89496311fe19110dce5931f20e..debe8a4cee1e25b7693068e51ee07f06e45d89bd 100644 (file)
@@ -1,2 +1,5 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_black(parser_black)
 cvc4_add_unit_test_black(parser_builder_black)
index fdd32be95c7be527d83e880d498711e4a24c11bd..5f8a79055b57a3181b2501dd12a958b495c15d17 100644 (file)
@@ -1 +1,4 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_white(pass_bv_gauss_white)
index c712d72777e6a76590d7c6006cb70eb386affcad..9904224456390511bb08b4879348b31f78937b11 100644 (file)
@@ -1 +1,4 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_white(cnf_stream_white)
index 3763c72cee2ac37eb45e74e21e99335102e78a53..79e5e78ff71e46c887e2b4fed77e8ac353381f26 100644 (file)
@@ -1,3 +1,6 @@
+#-----------------------------------------------------------------------------#
+# Add unit tests
+
 cvc4_add_unit_test_black(array_store_all_black)
 cvc4_add_unit_test_white(assert_white)
 cvc4_add_unit_test_black(binary_heap_black)