#-----------------------------------------------------------------------------#
find_package(PythonInterp REQUIRED)
-
find_package(ANTLR REQUIRED)
-cvc4_link_library(${ANTLR_LIBRARIES})
-include_directories(${ANTLR_INCLUDE_DIR})
find_package(GMP REQUIRED)
cvc4_link_library(${GMP_LIBRARIES})
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/git_versioninfo.cpp.in
- ${CMAKE_CURRENT_BINARY_DIR}/git_versioninfo.cpp
-)
-
set(cvc4_src_files
- ${CMAKE_CURRENT_BINARY_DIR}/git_versioninfo.cpp
api/cvc4cpp.cpp
api/cvc4cpp.h
api/cvc4cppkind.h
# tell cmake that the files are generated.
set_source_files_properties(${cvc4_gen_src_files} PROPERTIES GENERATED TRUE)
-add_library(cvc4 SHARED ${cvc4_src_files} ${cvc4_gen_src_files})
-set_target_properties(cvc4
- PROPERTIES
- COMPILE_DEFINITIONS
- __BUILDING_CVC4LIB
- __STDC_LIMIT_MACROS
- __STDC_FORMAT_MACROS
+add_library(cvc4 ${cvc4_src_files} ${cvc4_gen_src_files})
+target_compile_definitions(cvc4
+ PRIVATE
+ -D__BUILDING_CVC4LIB
+ -D__STDC_LIMIT_MACROS
+ -D__STDC_FORMAT_MACROS
)
add_dependencies(cvc4 gen-theory-files)
target_link_libraries(cvc4
+configure_file(git_versioninfo.cpp.in git_versioninfo.cpp)
+
set(base_src_files
configuration.cpp
configuration.h
output.h
)
-add_library(base SHARED ${base_src_files})
-set_target_properties(base PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4LIB)
+add_library(base
+ ${base_src_files} ${CMAKE_CURRENT_BINARY_DIR}/git_versioninfo.cpp)
+target_compile_definitions(base PRIVATE -D__BUILDING_CVC4LIB)
add_dependencies(base tags_headers)
#
--- /dev/null
+#include "base/configuration.h"
+const bool ::CVC4::Configuration::IS_GIT_BUILD = true;
+const char* const ::CVC4::Configuration::GIT_BRANCH_NAME = "@GIT_BRANCH@";
+const char* const ::CVC4::Configuration::GIT_COMMIT = "@GIT_SHA1@";
+const bool ::CVC4::Configuration::GIT_HAS_MODIFICATIONS = @GIT_IS_DIRTY@;
cvc3_compat.h
)
-add_library(cvc4compat SHARED ${compat_src_files})
-set_target_properties(cvc4compat
- PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4COMPATLIB)
+add_library(cvc4compat ${compat_src_files})
+target_compile_definitions(cvc4compat PRIVATE -D__BUILDING_CVC4COMPATLIB)
target_link_libraries(cvc4compat cvc4)
type_properties.h
)
-add_library(expr SHARED ${expr_src_files} ${expr_gen_src_files})
-set_target_properties(expr PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4LIB)
+add_library(expr ${expr_src_files} ${expr_gen_src_files})
+target_compile_definitions(expr PRIVATE -D__BUILDING_CVC4LIB)
#
# Generate code for kinds.
+++ /dev/null
-#include "base/configuration.h"
-const bool ::CVC4::Configuration::IS_GIT_BUILD = true;
-const char* const ::CVC4::Configuration::GIT_BRANCH_NAME = "@GIT_BRANCH@";
-const char* const ::CVC4::Configuration::GIT_COMMIT = "@GIT_SHA1@";
-const bool ::CVC4::Configuration::GIT_HAS_MODIFICATIONS = @GIT_IS_DIRTY@;
strtok_r.h
)
-add_library(replacements SHARED ${replacements_src_files})
-set_target_properties(replacements PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4LIB)
+add_library(replacements ${replacements_src_files})
+target_compile_definitions(replacements PRIVATE -D__BUILDING_CVC4LIB)
util.cpp
)
-add_library(main SHARED ${libmain_src_files})
-set_target_properties(main PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4DRIVER)
+add_library(main ${libmain_src_files})
+target_compile_definitions(main PRIVATE -D__BUILDING_CVC4DRIVER)
target_link_libraries(main cvc4 cvc4parser)
set(cvc4main_src_files
)
add_executable(cvc4-main ${cvc4main_src_files})
-set_target_properties(cvc4-main
- PROPERTIES
- OUTPUT_NAME cvc4
- COMPILE_DEFINITIONS __BUILDING_CVC4DRIVER)
-target_link_libraries(cvc4-main main) #cvc4 cvc4parser replacements)
+target_compile_definitions(cvc4-main PRIVATE -D__BUILDING_CVC4DRIVER)
+set_target_properties(cvc4-main PROPERTIES OUTPUT_NAME cvc4)
+target_link_libraries(cvc4-main main)
#set(pcvc4_src_files
# main.cpp
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)
+add_library(options options.cpp ${options_gen_cpp_files} ${options_src_files})
+target_compile_definitions(options PRIVATE -D__BUILDING_CVC4LIB)
parser_exception.h
)
-add_library(cvc4parser SHARED ${cvc4parser_src_files})
-set_target_properties(cvc4parser PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4PARSERLIB)
+add_library(cvc4parser ${cvc4parser_src_files})
+target_compile_definitions(cvc4parser PRIVATE -D__BUILDING_CVC4PARSERLIB)
target_link_libraries(cvc4parser parsercvc parsersmt1 parsersmt2 parsertptp cvc4)
+target_link_libraries(cvc4parser ${ANTLR_LIBRARIES})
+# ANTLR includes required for all subdirectories
+include_directories(cvc4parser PRIVATE ${ANTLR_INCLUDE_DIR})
add_subdirectory(cvc)
add_subdirectory(smt1)
add_subdirectory(smt2)
Cvc.g
)
-add_library(parsercvc SHARED ${parser_cvc_src_files} ${parser_cvc_gen_src_files})
-set_target_properties(parsercvc PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4PARSERLIB)
+add_library(parsercvc ${parser_cvc_src_files} ${parser_cvc_gen_src_files})
+target_compile_definitions(parsercvc PRIVATE -D__BUILDING_CVC4PARSERLIB)
set_source_files_properties(${parser_cvc_gen_src_files} PROPERTIES LANGUAGE CXX)
-add_dependencies(parsercvc expr)
+target_link_libraries(parsercvc expr)
Smt1.g
)
-add_library(parsersmt1 SHARED ${parser_smt1_src_files} ${parser_smt1_gen_src_files})
-set_target_properties(parsersmt1 PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4PARSERLIB)
+add_library(parsersmt1 ${parser_smt1_src_files} ${parser_smt1_gen_src_files})
+target_compile_definitions(parsersmt1 PRIVATE -D__BUILDING_CVC4PARSERLIB)
set_source_files_properties(${parser_smt1_gen_src_files} PROPERTIES LANGUAGE CXX)
-add_dependencies(parsersmt1 expr)
+target_link_libraries(parsersmt1 expr)
Smt2.g
)
-add_library(parsersmt2 SHARED ${parser_smt2_src_files} ${parser_smt2_gen_src_files})
-set_target_properties(parsersmt2 PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4PARSERLIB)
+add_library(parsersmt2 ${parser_smt2_src_files} ${parser_smt2_gen_src_files})
+target_compile_definitions(parsersmt2 PRIVATE -D__BUILDING_CVC4PARSERLIB)
set_source_files_properties(${parser_smt2_gen_src_files} PROPERTIES LANGUAGE CXX)
-add_dependencies(parsersmt2 expr)
+target_link_libraries(parsersmt2 expr)
Tptp.g
)
-add_library(parsertptp SHARED ${parser_tptp_src_files} ${parser_tptp_gen_src_files})
-set_target_properties(parsertptp PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4PARSERLIB)
+add_library(parsertptp ${parser_tptp_src_files} ${parser_tptp_gen_src_files})
+target_compile_definitions(parsertptp PRIVATE -D__BUILDING_CVC4PARSERLIB)
set_source_files_properties(${parser_tptp_gen_src_files} PROPERTIES LANGUAGE CXX)
-add_dependencies(parsertptp expr)
+target_link_libraries(parsertptp expr)
utils/Options.h
)
-include_directories(.)
-add_library(bvminisat SHARED ${bvminisat_src_files})
-set_target_properties(bvminisat
- PROPERTIES
- COMPILE_DEFINITIONS
- __BUILDING_CVC4LIB
- __STDC_LIMIT_MACROS
- __STDC_FORMAT_MACROS
+add_library(bvminisat ${bvminisat_src_files})
+target_include_directories(bvminisat PRIVATE .)
+target_compile_definitions(bvminisat
+ PRIVATE
+ -D__BUILDING_CVC4LIB
+ -D__STDC_LIMIT_MACROS
+ -D__STDC_FORMAT_MACROS
)
-add_dependencies(bvminisat expr)
+target_link_libraries(bvminisat expr)
utils/Options.h
)
-include_directories(.)
-add_library(minisat SHARED ${minisat_src_files})
-set_target_properties(minisat
- PROPERTIES
- COMPILE_DEFINITIONS
- __BUILDING_CVC4LIB
- __STDC_LIMIT_MACROS
- __STDC_FORMAT_MACROS
+add_library(minisat ${minisat_src_files})
+target_include_directories(minisat PRIVATE .)
+target_compile_definitions(minisat
+ PRIVATE
+ -D__BUILDING_CVC4LIB
+ -D__STDC_LIMIT_MACROS
+ -D__STDC_FORMAT_MACROS
)
-add_dependencies(minisat expr)
+target_link_libraries(minisat expr)
node_visitor.h
)
-add_library(smtutil SHARED ${smtutil_src_files})
-set_target_properties(smtutil PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4LIB)
+add_library(smtutil ${smtutil_src_files})
+target_compile_definitions(smtutil PRIVATE -D__BUILDING_CVC4LIB)
target_link_libraries(smtutil expr)
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/floatingpoint.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/floatingpoint.h)
-
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/rational.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/rational.h)
-
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/integer.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/integer.h)
+configure_file(floatingpoint.h.in floatingpoint.h)
+configure_file(rational.h.in rational.h)
+configure_file(integer.h.in integer.h)
set(util_src_files
abstract_value.cpp
list(APPEND util_src_files rational_gmp_imp.cpp integer_gmp_imp.cpp)
endif()
-add_library(util SHARED ${util_src_files})
-set_target_properties(util PROPERTIES COMPILE_DEFINITIONS __BUILDING_CVC4LIB)
-add_dependencies(util options)
+add_library(util ${util_src_files})
+target_compile_definitions(util PRIVATE -D__BUILDING_CVC4LIB)
+target_link_libraries(util options)